Skip to content

Commit

Permalink
Redefine "relevant Realm" and related terms
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger authored and domenic committed Mar 7, 2019
1 parent 37b1ce5 commit a0f1b23
Showing 1 changed file with 11 additions and 32 deletions.
43 changes: 11 additions & 32 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-primary-interface">primary interface</dfn></li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-interface-object">interface object</dfn></li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-interface-prototype-object">interface prototype object</dfn></li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#es-platform-objects">global environment associated with</dfn> a platform object</li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#es-platform-objects">[[Realm]] field of a platform object</dfn></li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-callback-context">callback context</dfn></li>
<li><dfn data-x-href="https://heycam.github.io/webidl/#dfn-frozen-array-type">frozen array</dfn> and
<dfn data-x-href="https://heycam.github.io/webidl/#dfn-create-frozen-array">creating a frozen array</dfn></li>
Expand Down Expand Up @@ -88208,9 +88208,6 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
data-x="">Array.prototype.map</code>). But this inconsistency is so embedded in the platform that
we have to accept it going forward.</p>

<p>Note that in constructors, where there is no <b>this</b> value yet, the <span
data-x="concept-current-everything">current</span> concept is the appropriate default.</p>

<div class="example">
<p>One reason why the <span data-x="concept-relevant-everything">relevant</span> concept is
generally a better default choice than the <span
Expand Down Expand Up @@ -88562,37 +88559,19 @@ document.querySelector("button").addEventListener("click", bound);

<h6>Relevant</h6>

<p>The <dfn data-export="">relevant settings object</dfn> for a <span>platform object</span> is
defined as follows:</p>

<dl class="switch">
<dt>If the object is a <span>global object</span></dt>
<dd>Each <span>global object</span> in this specification is created alongside a corresponding
<span>environment settings object</span>; that is its <span>relevant settings object</span>.</dd>

<dt>Otherwise</dt>
<dd>
<p>The <span>relevant settings object</span> for a non-global <span>platform object</span>
<var>o</var> is the <span>environment settings object</span> whose <span
data-x="concept-settings-object-global">global object</span> is the global object of the
<span>global environment associated with</span> <var>o</var>.</p>

<p class="note">The "<span>global environment associated with</span>" concept is from the olden
days, before the modern JavaScript specification and its concept of <span data-x="JavaScript
realm">realms</span>. We expect that as the Web IDL specification gets updated, every
<span>platform object</span> will have a <span data-x="JavaScript realm">Realm</span> associated
with it, and this definition can be re-cast in those terms. <ref spec=JAVASCRIPT> <ref
spec=WEBIDL></p>
</dd>
</dl>
<p>The <dfn data-export="" data-x="concept-relevant-realm">relevant Realm</dfn> for a
<span>platform object</span> is the value of <span data-x="[[Realm]] field of a platform
object">its [[Realm]] field</span>.</p>

<p>Then, the <dfn data-export="" data-x="concept-relevant-realm">relevant Realm</dfn> for a
<span>platform object</span> is the <span data-x="environment settings object's
Realm">Realm</span> of its <span>relevant settings object</span>.</p>
<p>Then, the <dfn data-export="">relevant settings object</dfn> for a <span>platform object</span>
<var>o</var> is the <span data-x="concept-realm-settings-object">environment settings
object</span> of the <span data-x="concept-relevant-realm">relevant Realm</span> for
<var>o</var>.</p>

<p>Similarly, the <dfn data-export="" id="concept-relevant-global">relevant global object</dfn>
for a <span>platform object</span> is the <span data-x="concept-settings-object-global">global
object</span> of its <span>relevant settings object</span>.</p>
for a <span>platform object</span> <var>o</var> is the <span data-x="concept-realm-global">global
object</span> of the <span data-x="concept-relevant-realm">relevant Realm</span> for
<var>o</var>.</p>


<h5>Killing scripts</h5>
Expand Down

0 comments on commit a0f1b23

Please sign in to comment.