Skip to content

Commit

Permalink
Rename [LenientThis] to [LegacyLenientThis]
Browse files Browse the repository at this point in the history
Part of #350.
  • Loading branch information
domenic committed Apr 8, 2020
1 parent a515499 commit 2837492
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ are applicable to regular and static attributes:
The following [=extended attributes=]
are applicable only to regular attributes:
[{{LegacyLenientSetter}}],
[{{LenientThis}}],
[{{LegacyLenientThis}}],
[{{PutForwards}}],
[{{Replaceable}}],
[{{Unforgeable}}].
Expand Down Expand Up @@ -9836,18 +9836,18 @@ See the <a href="#es-attributes">Attributes</a> section for how
</div>


<h4 id="LenientThis" extended-attribute lt="LenientThis">[LenientThis]</h4>
<h4 id="LegacyLenientThis" extended-attribute lt="LegacyLenientThis" oldids="LenientThis">[LegacyLenientThis]</h4>

<div class="advisement">

Specifications should not use [{{LenientThis}}]
Specifications should not use [{{LegacyLenientThis}}]
unless required for compatibility reasons.
Editors who wish to use this feature are strongly advised to discuss this
by <a href="https://github.com/heycam/webidl/issues/new?title=Intent%20to%20use%20[LenientThis]">filing an issue</a>
by <a href="https://github.com/heycam/webidl/issues/new?title=Intent%20to%20use%20[LegacyLenientThis]">filing an issue</a>
before proceeding.

<small class="non-normative">
The [{{LenientThis}}] [=extended attribute=] appears on
The [{{LegacyLenientThis}}] [=extended attribute=] appears on
the {{Document/onreadystatechange}},
{{Document/onmouseenter}}, and
{{Document/onmouseleave}} [=attributes=]
Expand All @@ -9856,37 +9856,37 @@ See the <a href="#es-attributes">Attributes</a> section for how

</div>

If the [{{LenientThis}}]
If the [{{LegacyLenientThis}}]
[=extended attribute=]
appears on a [=regular attribute=],
it indicates that invocations of the attribute’s getter or setter
with a <emu-val>this</emu-val> value that is not an
object that [=implements=] the [=interface=]
on which the attribute appears will be ignored.

The [{{LenientThis}}] extended attribute
The [{{LegacyLenientThis}}] extended attribute
must
[=takes no arguments|take no arguments=].
It must not be used on a
[=static attribute=].

The [{{LenientThis}}] extended attribute must not be used on an attribute declared on a
The [{{LegacyLenientThis}}] extended attribute must not be used on an attribute declared on a
[=namespace=].

See the <a href="#es-attributes">Attributes</a> section for how
[{{LenientThis}}]
[{{LegacyLenientThis}}]
is to be implemented.

<div class="example">

The following IDL fragment defines an interface that uses the
[{{LenientThis}}] extended
[{{LegacyLenientThis}}] extended
attribute.

<pre highlight="webidl">
[Exposed=Window]
interface Example {
[LenientThis] attribute DOMString x;
[LegacyLenientThis] attribute DOMString x;
attribute DOMString y;
};
</pre>
Expand All @@ -9903,10 +9903,10 @@ is to be implemented.
// Fine.
example.x;

// Ignored, since the this value is not an Example object and [LenientThis] is used.
// Ignored, since the this value is not an Example object and [LegacyLenientThis] is used.
Object.getOwnPropertyDescriptor(Example.prototype, "x").get.call(obj);

// Also ignored, since Example.prototype is not an Example object and [LenientThis] is used.
// Also ignored, since Example.prototype is not an Example object and [LegacyLenientThis] is used.
Example.prototype.x;

// Throws a TypeError, since Example.prototype is not an Example object.
Expand Down Expand Up @@ -11741,13 +11741,13 @@ in which case they are exposed on every object that [=implements=] the interface
<emu-val>null</emu-val> or <emu-val>undefined</emu-val>, or |realm|'s
[=Realm/global object=] otherwise.
(This will subsequently cause a {{ECMAScript/TypeError}} in a few steps, if
the global object does not implement |target| and [{{LenientThis}}] is not
the global object does not implement |target| and [{{LegacyLenientThis}}] is not
specified.)
<!-- https://www.w3.org/Bugs/Public/show_bug.cgi?id=18547#c9 -->
1. If |esValue| [=is a platform object=], then [=perform a security check=],
passing |esValue|, |attribute|'s [=identifier=], and "getter".
1. If |esValue| does not [=implement=] |target|, then:
1. If |attribute| was specified with the [{{LenientThis}}]
1. If |attribute| was specified with the [{{LegacyLenientThis}}]
[=extended attribute=], then return <emu-val>undefined</emu-val>.
1. Otherwise, [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
1. If |attribute|'s type is an [=observable array type=], then return |esValue|'s
Expand Down Expand Up @@ -11794,13 +11794,13 @@ in which case they are exposed on every object that [=implements=] the interface
<emu-val>null</emu-val> or <emu-val>undefined</emu-val>, or |realm|'s
[=Realm/global object=] otherwise.
(This will subsequently cause a {{ECMAScript/TypeError}} in a few steps, if
the global object does not implement |target| and [{{LenientThis}}] is not
the global object does not implement |target| and [{{LegacyLenientThis}}] is not
specified.)
<!-- https://www.w3.org/Bugs/Public/show_bug.cgi?id=18547#c9 -->
1. If |esValue| [=is a platform object=], then [=perform a security check=], passing
|esValue|, |id|, and "setter".
1. Let |validThis| be true if |esValue| [=implements=] |target|, or false otherwise.
1. If |validThis| is false and |attribute| was not specified with the [{{LenientThis}}]
1. If |validThis| is false and |attribute| was not specified with the [{{LegacyLenientThis}}]
[=extended attribute=], then [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
1. If |attribute| is declared with the [{{Replaceable}}] extended attribute, then:
1. Perform [=?=] <a abstract-op>CreateDataProperty</a>(|esValue|, |id|, |V|).
Expand Down Expand Up @@ -11936,7 +11936,7 @@ in which case they are exposed on every object that [=implements=] the interface
<emu-val>null</emu-val> or <emu-val>undefined</emu-val>, or |realm|'s
[=Realm/global object=] otherwise.
(This will subsequently cause a {{ECMAScript/TypeError}} in a few steps, if
the global object does not implement |target| and [{{LenientThis}}] is not
the global object does not implement |target| and [{{LegacyLenientThis}}] is not
specified.)
<!-- https://www.w3.org/Bugs/Public/show_bug.cgi?id=18547#c9 -->
1. If |esValue| [=is a platform object=], then [=perform a security check=],
Expand Down

0 comments on commit 2837492

Please sign in to comment.