Skip to content

Consider making $-prefixed getters SameValue with the equivalent non‑$ getters #17

Description

@ExE-Boss

Currently, the following all log false in Firefox and the spec:

const $gOPD = Object.getOwnPropertyDescriptor;

$gOPD(RegExp, "$_").get === $gOPD(RegExp, "input").get;
$gOPD(RegExp, "$&").get === $gOPD(RegExp, "lastMatch").get;
$gOPD(RegExp, "$+").get === $gOPD(RegExp, "lastParen").get;
$gOPD(RegExp, "$`").get === $gOPD(RegExp, "leftContext").get;
$gOPD(RegExp, "$'").get === $gOPD(RegExp, "rightContext").get;

This differs from the following, which all log true:

const $TypedArray = Object.getPrototypeOf(Uint8Array);

Array.prototype.values === Array.prototype[Symbol.iterator];
$TypedArray.prototype.values === $TypedArray.prototype[Symbol.iterator];
Set.prototype.values === Set.prototype[Symbol.iterator];
Map.prototype.entries === Map.prototype[Symbol.iterator];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions