[html5] r7954 - [e] (0) Try to clean up text where I referred to scripts that called a method, e [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 11 14:45:25 PDT 2013


Author: ianh
Date: 2013-06-11 14:45:24 -0700 (Tue, 11 Jun 2013)
New Revision: 7954

Modified:
   complete.html
   index
   source
Log:
[e] (0) Try to clean up text where I referred to scripts that called a method, etc. Introduces the term 'incumbent script'.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18242
Affected topics: DOM APIs, HTML, HTML Syntax and Parsing, Security, Workers

Modified: complete.html
===================================================================
--- complete.html	2013-06-11 18:24:52 UTC (rev 7953)
+++ complete.html	2013-06-11 21:45:24 UTC (rev 7954)
@@ -65147,10 +65147,10 @@
   <p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
   navigated to another domain.</p>
 
-  <hr><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn> method on <code><a href=#window>Window</a></code>
+  <hr><!--CLEANUP--><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn> method on <code><a href=#window>Window</a></code>
   objects should, if the corresponding <a href=#browsing-context>browsing context</a> <var title="">A</var> is
   <a href=#script-closable>script-closable</a> and the <a href="#script's-browsing-context" title="script's browsing context">browsing
-  context</a> of the <a href=#concept-script title=concept-script>script</a> that invokes the method is
+  context</a> of the <a href=#incumbent-script>incumbent script</a> is
   <a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing context</a> <var title="">A</var>, <a href=#close-a-browsing-context title="close a browsing context">close</a> the <a href=#browsing-context>browsing context</a> <var title="">A</var>.</p>
 
   <p>A <a href=#browsing-context>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context>auxiliary
@@ -65625,11 +65625,12 @@
      <dd>
 
       <p>The <a href=#origin>origin</a> is an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the
-      <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code> or script that initiated the <a href=#navigate title=navigate>navigation</a> to that <a href=#url>URL</a>.</p>
+      <a href=#origin>origin</a> of the <a href=#incumbent-script>incumbent script</a> when
+      the <a href=#navigate>navigate</a> algorithm was invoked, or, if no <a href=#concept-script title=concept-script>script</a>
+      was involved, of the <code><a href=#document>Document</a></code> of the element that initiated the <a href=#navigate title=navigate>navigation</a> to that <a href=#url>URL</a>.</p>
 
-      <p>The <a href=#effective-script-origin>effective script origin</a> is initially an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of the
-      <code><a href=#document>Document</a></code> or script that initiated the <a href=#navigate title=navigate>navigation</a> to
-      that <a href=#url>URL</a>.</p>
+      <p>The <a href=#effective-script-origin>effective script origin</a> is initially an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of that same <a href=#concept-script title=concept-script>script</a> or
+      <code><a href=#document>Document</a></code>.</p>
 
      </dd>
 
@@ -65770,7 +65771,7 @@
 
      <dt>If a script is a function or other code reference created by another script</dt>
 
-     <dd>The owner is the script that created it.</dd>
+     <dd>The owner is the <a href=#incumbent-script>incumbent script</a> when the function or other code reference was created.</dd>
 
 
      <dt>If a script is a <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
@@ -65810,7 +65811,7 @@
      <dt>If a script is a <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
      URL</a> to which a <a href=#browsing-context>browsing context</a> is being <a href=#navigate title=navigate>navigated</a>, the URL having been provided by script</dt>
 
-     <dd>The owner is the script that provided the URL.</dd>
+     <dd>The owner is the <a href=#incumbent-script>incumbent script</a> when the <a href=#navigate>navigate</a> algorithm was invoked.</dd>
 
     </dl><p>The <a href=#origin>origin</a> of the script is then an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#origin>origin</a> of the owner, and the
     <a href=#effective-script-origin>effective script origin</a> of the script is an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of the
@@ -66933,7 +66934,7 @@
   context</a> to the specified <var title="">url</var> with <a href=#replacement-enabled>replacement enabled</a>.</p>
 
   <p>Navigation for the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods must be done with the <a href="#script's-browsing-context" title="script's
-  browsing context">browsing context</a> of the script that invoked the method as the
+  browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent script</a> as the
   <a href=#source-browsing-context>source browsing context</a>.</p>
 
   <p>If the <a href=#resolve-a-url title="resolve a url">resolving</a> step of the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods is not successful, then the user agent must
@@ -70912,7 +70913,15 @@
   no <a href=#entry-script>entry script</a>. It is changed by the <a href=#jump-to-a-code-entry-point>jump to a code entry-point</a>
   algorithm above.</p>
 
-  <p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=running-mutation-observers>running mutation
+<!--CLEANUP:all occurrences of 'incumbent'-->
+  <p>The <dfn id=incumbent-script>incumbent script</dfn> is the <a href=#concept-script title=concept-script>script</a> corresponding
+  to the most-recently evaluated <i>SourceElements</i> JavaScript production whose evaluation
+  directly resulted in the invocation of the current API (method, attribute getter or setter,
+  constructor, etc).</p>
+  <!-- the <span title="concept-script">script</span> that invoked the current API -->
+  <!-- the <span title="concept-script">script</span> corresponding to the top execution context on the logical JavaScript execution context stack, also known as the running execution context -->
+
+  <hr><p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=running-mutation-observers>running mutation
   observers</dfn> flag, which must initially be false. It is used to prevent reentrant invocation of
   the algorithm to <a href=#concept-mo-invoke title=concept-mo-invoke>invoke <code>MutationObserver</code>
   objects</a>. For the purposes of <code><a href=#mutationobserver>MutationObserver</a></code> objects, each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of
@@ -72957,7 +72966,8 @@
    <li>
 
     <p>If the <a href=#active-sandboxing-flag-set>active sandboxing flag set</a> of the <a href=#active-document>active document</a> of the
-    <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method has its <a href=#sandboxed-auxiliary-navigation-browsing-context-flag>sandboxed auxiliary
+    <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a> has its <a href=#sandboxed-auxiliary-navigation-browsing-context-flag>sandboxed auxiliary
     navigation browsing context flag</a> set, then return the empty string and abort these
     steps.</p>
 
@@ -72965,6 +72975,14 @@
 
    <li>
 
+    <p>Let <var title="">incumbent origin</var> be the <span>effective origin</span> of the
+    <a href=#incumbent-script>incumbent script</a> at the time the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method was called.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
     <p>Let <var title="">the list of background browsing
     contexts</var> be a list of all the browsing contexts that:</p>
 
@@ -72972,8 +72990,7 @@
      of the <code><a href=#window>Window</a></code> object on which the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method was called, and that</li>
 
      <li>have an <a href=#active-document>active document</a> whose <a href=#origin>origin</a> is the <a href=#same-origin title="same
-     origin">same</a> as the <a href=#origin>origin</a> of the <a href=#concept-script title=concept-script>script</a> that called the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method at the time the method was
-     called,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
+     origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
      able to block that domain -->
 
     </ul><p>...as well as any browsing contexts that are nested inside any
@@ -73007,9 +73024,10 @@
 
     <p>Set all the flags in the new browsing context's <a href=#popup-sandboxing-flag-set>popup sandboxing flag set</a> that
     are set in the <a href=#active-sandboxing-flag-set>active sandboxing flag set</a> of the <a href=#active-document>active document</a> of
-    the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method. The <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked
-    the method must be set as the new browsing context's <a href=#one-permitted-sandboxed-navigator>one permitted sandboxed
+    the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a>. The <a href="#script's-browsing-context" title="script's browsing
+    context">browsing context</a> of the <a href=#incumbent-script>incumbent script</a>
+    must be set as the new browsing context's <a href=#one-permitted-sandboxed-navigator>one permitted sandboxed
     navigator</a>.</p>
 
    </li>
@@ -73022,7 +73040,7 @@
 
    <li>
 
-    <p>Let the <a href="#dialog-arguments'-origin">dialog arguments' origin</a> be the <a href=#origin>origin</a> of the <a href=#concept-script title=concept-script>script</a> that called the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method.</p>
+    <p>Let the <a href="#dialog-arguments'-origin">dialog arguments' origin</a> be <var title="">incumbent origin</var>.</p>
 
    </li>
 
@@ -73030,7 +73048,8 @@
 
     <p><a href=#navigate>Navigate</a><!--DONAV showModalDialog--> the new <a href=#browsing-context>browsing context</a> to
     the <a href=#absolute-url>absolute URL</a> that resulted from <a href=#resolve-a-url title="resolve a url">resolving</a>
-    <var title="">url</var> earlier, with <a href=#replacement-enabled>replacement enabled</a>, and with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method as the <a href=#source-browsing-context>source browsing
+    <var title="">url</var> earlier, with <a href=#replacement-enabled>replacement enabled</a>, and with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a> as the <a href=#source-browsing-context>source browsing
     context</a>.</p>
 
    </li>
@@ -79077,7 +79096,7 @@
   origin</dfn> that is set when the object is created.</p>
 
   <p class=note>For <a href=#data-protocol title="data protocol"><code title="">data:</code> URLs</a>, this is the <a href=#origin>origin</a>
-  of the <a href=#entry-script>entry script</a> that called the constructor. For
+  of the <a href=#entry-script>entry script</a> when the constructor was called. For
   other <a href=#url title=URL>URLs</a>, this is the <a href=#origin>origin</a>
   of the value of the <a href=#absolute-url>absolute URL</a> given in the worker's
   <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location></a></code> attribute.</p>
@@ -79649,7 +79668,8 @@
    <li><p>Create a new <code><a href=#worker>Worker</a></code> object, associated with <var title="">worker global
    scope</var>. Let <var title="">worker</var> be this new object.</li>
 
-   <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor. Let this be the <var title="">outside port</var>.</li>
+   <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>.
+   Let this be the <var title="">outside port</var>.</li>
 
    <li><p>Associate the <var title="">outside port</var> with <var title="">worker</var>.</li>
 
@@ -79673,7 +79693,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <a href=#list-of-relevant-document-objects-to-add>list of relevant <code>Document</code> objects to
-    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a>.</p>
 
    </li>
 
@@ -79687,19 +79708,19 @@
 
    <li>
 
-    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a> is a
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object (i.e. we are creating a nested worker), add <var title="">worker global scope</var> to the list of <a href="#the-worker's-workers">the worker's workers</a> of the
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that is the <a href="#script's-global-object" title="script's global object">global
-    object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the
-    constructor.</p>
+    object</a> of the <a href=#incumbent-script>incumbent script</a>.</p>
 
    </li>
 
    <li>
 
     <p><a href=#run-a-worker>Run a worker</a> for the resulting <a href=#absolute-url>absolute URL</a>, with the
-    <a href="#script's-browsing-context">script's browsing context</a> of the script that invoked the method as the <var title="">owner browsing context</var>, with the <a href="#script's-document">script's document</a> of the script
-    that invoked the method as the <var title="">owner document</var>, with the <a href=#origin>origin</a>
+    <a href="#script's-browsing-context">script's browsing context</a> of the <a href=#incumbent-script>incumbent script</a> as the <var title="">owner browsing context</var>, with the <a href="#script's-document">script's document</a> of the
+    <a href=#incumbent-script>incumbent script</a> as the <var title="">owner document</var>, with the <a href=#origin>origin</a>
     of the <a href=#entry-script>entry script</a> as the <var title="">owner origin</var>, and with <var title="">worker global scope</var> as the global scope.</p>
 
    </li>
@@ -79751,7 +79772,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <a href=#list-of-relevant-document-objects-to-add>list of relevant <code>Document</code> objects to
-    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a>.</p>
 
    </li>
 
@@ -79762,7 +79784,7 @@
     <ol><li><p>Create a new <code><a href=#sharedworker>SharedWorker</a></code> object, which will shortly be associated with a
      <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object. Let this <code><a href=#sharedworker>SharedWorker</a></code> object be <var title="">worker</var>.</li>
 
-     <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the script that invoked the method. Let
+     <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>. Let
      this be the <var title="">outside port</var>.</li>
 
      <li><p>Assign <var title="">outside port</var> to the <code title=dom-SharedWorker-port><a href=#dom-sharedworker-port>port</a></code> attribute of <var title="">worker</var>.</li>
@@ -79785,8 +79807,8 @@
      <li>
 
       <p>If <var title="">worker global scope</var> is not null, but the user agent has been
-      configured to disallow communication between the <a href=#concept-script title=concept-script>script</a>
-      that invoked the constructor and the worker represented by the <var title="">worker global
+      configured to disallow communication between the <a href=#incumbent-script>incumbent script</a>
+      and the worker represented by the <var title="">worker global
       scope</var>, then set <var title="">worker global scope</var> to null.</p>
 
       <p class=note>For example, a user agent could have a development mode that isolates a
@@ -79831,10 +79853,12 @@
 
        <li>
 
-        <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+        <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+        script</a> is a
         <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object, add <var title="">worker global scope</var> to the
         list of <a href="#the-worker's-workers">the worker's workers</a> of the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that
-        is the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+        is the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+        script</a>.</p>
 
        </li>
 
@@ -79880,18 +79904,19 @@
 
    <li>
 
-    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a> that invoked the constructor is a
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object, add <var title="">worker global scope</var> to the list
     of <a href="#the-worker's-workers">the worker's workers</a> of the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that is the
-    <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>.</p>
 
    </li>
 
    <li>
 
     <p><a href=#run-a-worker>Run a worker</a> for <var title="">scriptURL</var>, with the <a href="#script's-browsing-context">script's browsing
-    context</a> of the script that invoked the method as the <var title="">owner browsing
-    context</var>, with the <a href="#script's-document">script's document</a> of the script that invoked the method as
+    context</a> of the <a href=#incumbent-script>incumbent script</a> as the <var title="">owner browsing
+    context</var>, with the <a href="#script's-document">script's document</a> of the <a href=#incumbent-script>incumbent script</a>
     the <var title="">owner document</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
     script</a> as the <var title="">owner origin</var>, and with <var title="">worker global
     scope</var> as the global scope.</p>
@@ -79994,9 +80019,7 @@
 
       <p>If an exception was thrown or if the script was prematurely
       aborted, then abort all these steps, letting the exception or
-      aborting continue to be processed by the script that called the
-      <code title=dom-WorkerGlobalScope-importScripts><a href=#dom-workerglobalscope-importscripts>importScripts()</a></code>
-      method.</p>
+      aborting continue to be processed by the <a href=#incumbent-script>incumbent script</a>.</p>
 
       <p>If the "<a href=#kill-a-worker>kill a worker</a>" or "<a href=#terminate-a-worker>terminate a
       worker</a>" algorithms abort the script then abort all these
@@ -82085,7 +82108,7 @@
     <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
     default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be
     initialized to the value of <var title="">message clone</var>, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
-    <a href=#origin>origin</a> of the script that invoked the method, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be initialized to the
+    <a href=#origin>origin</a> of the <a href=#incumbent-script>incumbent script</a>, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be initialized to the
     <a href="#script's-global-object">script's global object</a>'s <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute must be initialized to the <var title="">new ports</var> array.
     </p> <!-- invariant: the global object is always a Window if the
     script can see this method -->
@@ -83729,7 +83752,7 @@
   <p><a href=#raw-text-elements>Raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a>, though it has <a href=#cdata-rcdata-restrictions>restrictions</a> described
   below.</p>
 
-  <p><a href=#escapable-raw-text-elements>escapable raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a> and <a href=#syntax-charref title=syntax-charref>character references</a>, but the text
+  <p><a href=#escapable-raw-text-elements>Escapable raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a> and <a href=#syntax-charref title=syntax-charref>character references</a>, but the text
   must not contain an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous ampersand</a>.
   There are also <a href=#cdata-rcdata-restrictions>further
   restrictions</a> described below.</p>

Modified: index
===================================================================
--- index	2013-06-11 18:24:52 UTC (rev 7953)
+++ index	2013-06-11 21:45:24 UTC (rev 7954)
@@ -65147,10 +65147,10 @@
   <p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
   navigated to another domain.</p>
 
-  <hr><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn> method on <code><a href=#window>Window</a></code>
+  <hr><!--CLEANUP--><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn> method on <code><a href=#window>Window</a></code>
   objects should, if the corresponding <a href=#browsing-context>browsing context</a> <var title="">A</var> is
   <a href=#script-closable>script-closable</a> and the <a href="#script's-browsing-context" title="script's browsing context">browsing
-  context</a> of the <a href=#concept-script title=concept-script>script</a> that invokes the method is
+  context</a> of the <a href=#incumbent-script>incumbent script</a> is
   <a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing context</a> <var title="">A</var>, <a href=#close-a-browsing-context title="close a browsing context">close</a> the <a href=#browsing-context>browsing context</a> <var title="">A</var>.</p>
 
   <p>A <a href=#browsing-context>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context>auxiliary
@@ -65625,11 +65625,12 @@
      <dd>
 
       <p>The <a href=#origin>origin</a> is an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the
-      <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code> or script that initiated the <a href=#navigate title=navigate>navigation</a> to that <a href=#url>URL</a>.</p>
+      <a href=#origin>origin</a> of the <a href=#incumbent-script>incumbent script</a> when
+      the <a href=#navigate>navigate</a> algorithm was invoked, or, if no <a href=#concept-script title=concept-script>script</a>
+      was involved, of the <code><a href=#document>Document</a></code> of the element that initiated the <a href=#navigate title=navigate>navigation</a> to that <a href=#url>URL</a>.</p>
 
-      <p>The <a href=#effective-script-origin>effective script origin</a> is initially an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of the
-      <code><a href=#document>Document</a></code> or script that initiated the <a href=#navigate title=navigate>navigation</a> to
-      that <a href=#url>URL</a>.</p>
+      <p>The <a href=#effective-script-origin>effective script origin</a> is initially an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of that same <a href=#concept-script title=concept-script>script</a> or
+      <code><a href=#document>Document</a></code>.</p>
 
      </dd>
 
@@ -65770,7 +65771,7 @@
 
      <dt>If a script is a function or other code reference created by another script</dt>
 
-     <dd>The owner is the script that created it.</dd>
+     <dd>The owner is the <a href=#incumbent-script>incumbent script</a> when the function or other code reference was created.</dd>
 
 
      <dt>If a script is a <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
@@ -65810,7 +65811,7 @@
      <dt>If a script is a <a href=#javascript-protocol title="javascript protocol"><code title="">javascript:</code>
      URL</a> to which a <a href=#browsing-context>browsing context</a> is being <a href=#navigate title=navigate>navigated</a>, the URL having been provided by script</dt>
 
-     <dd>The owner is the script that provided the URL.</dd>
+     <dd>The owner is the <a href=#incumbent-script>incumbent script</a> when the <a href=#navigate>navigate</a> algorithm was invoked.</dd>
 
     </dl><p>The <a href=#origin>origin</a> of the script is then an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#origin>origin</a> of the owner, and the
     <a href=#effective-script-origin>effective script origin</a> of the script is an <a href=#concept-origin-alias title=concept-origin-alias>alias</a> to the <a href=#effective-script-origin>effective script origin</a> of the
@@ -66933,7 +66934,7 @@
   context</a> to the specified <var title="">url</var> with <a href=#replacement-enabled>replacement enabled</a>.</p>
 
   <p>Navigation for the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods must be done with the <a href="#script's-browsing-context" title="script's
-  browsing context">browsing context</a> of the script that invoked the method as the
+  browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent script</a> as the
   <a href=#source-browsing-context>source browsing context</a>.</p>
 
   <p>If the <a href=#resolve-a-url title="resolve a url">resolving</a> step of the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods is not successful, then the user agent must
@@ -70912,7 +70913,15 @@
   no <a href=#entry-script>entry script</a>. It is changed by the <a href=#jump-to-a-code-entry-point>jump to a code entry-point</a>
   algorithm above.</p>
 
-  <p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=running-mutation-observers>running mutation
+<!--CLEANUP:all occurrences of 'incumbent'-->
+  <p>The <dfn id=incumbent-script>incumbent script</dfn> is the <a href=#concept-script title=concept-script>script</a> corresponding
+  to the most-recently evaluated <i>SourceElements</i> JavaScript production whose evaluation
+  directly resulted in the invocation of the current API (method, attribute getter or setter,
+  constructor, etc).</p>
+  <!-- the <span title="concept-script">script</span> that invoked the current API -->
+  <!-- the <span title="concept-script">script</span> corresponding to the top execution context on the logical JavaScript execution context stack, also known as the running execution context -->
+
+  <hr><p>Each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of related similar-origin browsing contexts</a> has a <dfn id=running-mutation-observers>running mutation
   observers</dfn> flag, which must initially be false. It is used to prevent reentrant invocation of
   the algorithm to <a href=#concept-mo-invoke title=concept-mo-invoke>invoke <code>MutationObserver</code>
   objects</a>. For the purposes of <code><a href=#mutationobserver>MutationObserver</a></code> objects, each <a href=#unit-of-related-similar-origin-browsing-contexts>unit of
@@ -72957,7 +72966,8 @@
    <li>
 
     <p>If the <a href=#active-sandboxing-flag-set>active sandboxing flag set</a> of the <a href=#active-document>active document</a> of the
-    <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method has its <a href=#sandboxed-auxiliary-navigation-browsing-context-flag>sandboxed auxiliary
+    <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a> has its <a href=#sandboxed-auxiliary-navigation-browsing-context-flag>sandboxed auxiliary
     navigation browsing context flag</a> set, then return the empty string and abort these
     steps.</p>
 
@@ -72965,6 +72975,14 @@
 
    <li>
 
+    <p>Let <var title="">incumbent origin</var> be the <span>effective origin</span> of the
+    <a href=#incumbent-script>incumbent script</a> at the time the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method was called.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
     <p>Let <var title="">the list of background browsing
     contexts</var> be a list of all the browsing contexts that:</p>
 
@@ -72972,8 +72990,7 @@
      of the <code><a href=#window>Window</a></code> object on which the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method was called, and that</li>
 
      <li>have an <a href=#active-document>active document</a> whose <a href=#origin>origin</a> is the <a href=#same-origin title="same
-     origin">same</a> as the <a href=#origin>origin</a> of the <a href=#concept-script title=concept-script>script</a> that called the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method at the time the method was
-     called,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
+     origin">same</a> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
      able to block that domain -->
 
     </ul><p>...as well as any browsing contexts that are nested inside any
@@ -73007,9 +73024,10 @@
 
     <p>Set all the flags in the new browsing context's <a href=#popup-sandboxing-flag-set>popup sandboxing flag set</a> that
     are set in the <a href=#active-sandboxing-flag-set>active sandboxing flag set</a> of the <a href=#active-document>active document</a> of
-    the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method. The <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked
-    the method must be set as the new browsing context's <a href=#one-permitted-sandboxed-navigator>one permitted sandboxed
+    the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a>. The <a href="#script's-browsing-context" title="script's browsing
+    context">browsing context</a> of the <a href=#incumbent-script>incumbent script</a>
+    must be set as the new browsing context's <a href=#one-permitted-sandboxed-navigator>one permitted sandboxed
     navigator</a>.</p>
 
    </li>
@@ -73022,7 +73040,7 @@
 
    <li>
 
-    <p>Let the <a href="#dialog-arguments'-origin">dialog arguments' origin</a> be the <a href=#origin>origin</a> of the <a href=#concept-script title=concept-script>script</a> that called the <code title=dom-showModalDialog><a href=#dom-showmodaldialog>showModalDialog()</a></code> method.</p>
+    <p>Let the <a href="#dialog-arguments'-origin">dialog arguments' origin</a> be <var title="">incumbent origin</var>.</p>
 
    </li>
 
@@ -73030,7 +73048,8 @@
 
     <p><a href=#navigate>Navigate</a><!--DONAV showModalDialog--> the new <a href=#browsing-context>browsing context</a> to
     the <a href=#absolute-url>absolute URL</a> that resulted from <a href=#resolve-a-url title="resolve a url">resolving</a>
-    <var title="">url</var> earlier, with <a href=#replacement-enabled>replacement enabled</a>, and with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the method as the <a href=#source-browsing-context>source browsing
+    <var title="">url</var> earlier, with <a href=#replacement-enabled>replacement enabled</a>, and with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the <a href=#incumbent-script>incumbent
+    script</a> as the <a href=#source-browsing-context>source browsing
     context</a>.</p>
 
    </li>
@@ -79077,7 +79096,7 @@
   origin</dfn> that is set when the object is created.</p>
 
   <p class=note>For <a href=#data-protocol title="data protocol"><code title="">data:</code> URLs</a>, this is the <a href=#origin>origin</a>
-  of the <a href=#entry-script>entry script</a> that called the constructor. For
+  of the <a href=#entry-script>entry script</a> when the constructor was called. For
   other <a href=#url title=URL>URLs</a>, this is the <a href=#origin>origin</a>
   of the value of the <a href=#absolute-url>absolute URL</a> given in the worker's
   <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location></a></code> attribute.</p>
@@ -79649,7 +79668,8 @@
    <li><p>Create a new <code><a href=#worker>Worker</a></code> object, associated with <var title="">worker global
    scope</var>. Let <var title="">worker</var> be this new object.</li>
 
-   <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor. Let this be the <var title="">outside port</var>.</li>
+   <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>.
+   Let this be the <var title="">outside port</var>.</li>
 
    <li><p>Associate the <var title="">outside port</var> with <var title="">worker</var>.</li>
 
@@ -79673,7 +79693,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <a href=#list-of-relevant-document-objects-to-add>list of relevant <code>Document</code> objects to
-    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a>.</p>
 
    </li>
 
@@ -79687,19 +79708,19 @@
 
    <li>
 
-    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a> is a
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object (i.e. we are creating a nested worker), add <var title="">worker global scope</var> to the list of <a href="#the-worker's-workers">the worker's workers</a> of the
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that is the <a href="#script's-global-object" title="script's global object">global
-    object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the
-    constructor.</p>
+    object</a> of the <a href=#incumbent-script>incumbent script</a>.</p>
 
    </li>
 
    <li>
 
     <p><a href=#run-a-worker>Run a worker</a> for the resulting <a href=#absolute-url>absolute URL</a>, with the
-    <a href="#script's-browsing-context">script's browsing context</a> of the script that invoked the method as the <var title="">owner browsing context</var>, with the <a href="#script's-document">script's document</a> of the script
-    that invoked the method as the <var title="">owner document</var>, with the <a href=#origin>origin</a>
+    <a href="#script's-browsing-context">script's browsing context</a> of the <a href=#incumbent-script>incumbent script</a> as the <var title="">owner browsing context</var>, with the <a href="#script's-document">script's document</a> of the
+    <a href=#incumbent-script>incumbent script</a> as the <var title="">owner document</var>, with the <a href=#origin>origin</a>
     of the <a href=#entry-script>entry script</a> as the <var title="">owner origin</var>, and with <var title="">worker global scope</var> as the global scope.</p>
 
    </li>
@@ -79751,7 +79772,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <a href=#list-of-relevant-document-objects-to-add>list of relevant <code>Document</code> objects to
-    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    add</a> given the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a>.</p>
 
    </li>
 
@@ -79762,7 +79784,7 @@
     <ol><li><p>Create a new <code><a href=#sharedworker>SharedWorker</a></code> object, which will shortly be associated with a
      <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object. Let this <code><a href=#sharedworker>SharedWorker</a></code> object be <var title="">worker</var>.</li>
 
-     <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the script that invoked the method. Let
+     <li><p><a href=#create-a-new-messageport-object>Create a new <code>MessagePort</code> object</a> owned by the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>. Let
      this be the <var title="">outside port</var>.</li>
 
      <li><p>Assign <var title="">outside port</var> to the <code title=dom-SharedWorker-port><a href=#dom-sharedworker-port>port</a></code> attribute of <var title="">worker</var>.</li>
@@ -79785,8 +79807,8 @@
      <li>
 
       <p>If <var title="">worker global scope</var> is not null, but the user agent has been
-      configured to disallow communication between the <a href=#concept-script title=concept-script>script</a>
-      that invoked the constructor and the worker represented by the <var title="">worker global
+      configured to disallow communication between the <a href=#incumbent-script>incumbent script</a>
+      and the worker represented by the <var title="">worker global
       scope</var>, then set <var title="">worker global scope</var> to null.</p>
 
       <p class=note>For example, a user agent could have a development mode that isolates a
@@ -79831,10 +79853,12 @@
 
        <li>
 
-        <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+        <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+        script</a> is a
         <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object, add <var title="">worker global scope</var> to the
         list of <a href="#the-worker's-workers">the worker's workers</a> of the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that
-        is the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+        is the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+        script</a>.</p>
 
        </li>
 
@@ -79880,18 +79904,19 @@
 
    <li>
 
-    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor is a
+    <p>If the <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent
+    script</a> that invoked the constructor is a
     <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object, add <var title="">worker global scope</var> to the list
     of <a href="#the-worker's-workers">the worker's workers</a> of the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object that is the
-    <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#concept-script title=concept-script>script</a> that invoked the constructor.</p>
+    <a href="#script's-global-object" title="script's global object">global object</a> of the <a href=#incumbent-script>incumbent script</a>.</p>
 
    </li>
 
    <li>
 
     <p><a href=#run-a-worker>Run a worker</a> for <var title="">scriptURL</var>, with the <a href="#script's-browsing-context">script's browsing
-    context</a> of the script that invoked the method as the <var title="">owner browsing
-    context</var>, with the <a href="#script's-document">script's document</a> of the script that invoked the method as
+    context</a> of the <a href=#incumbent-script>incumbent script</a> as the <var title="">owner browsing
+    context</var>, with the <a href="#script's-document">script's document</a> of the <a href=#incumbent-script>incumbent script</a>
     the <var title="">owner document</var>, with the <a href=#origin>origin</a> of the <a href=#entry-script>entry
     script</a> as the <var title="">owner origin</var>, and with <var title="">worker global
     scope</var> as the global scope.</p>
@@ -79994,9 +80019,7 @@
 
       <p>If an exception was thrown or if the script was prematurely
       aborted, then abort all these steps, letting the exception or
-      aborting continue to be processed by the script that called the
-      <code title=dom-WorkerGlobalScope-importScripts><a href=#dom-workerglobalscope-importscripts>importScripts()</a></code>
-      method.</p>
+      aborting continue to be processed by the <a href=#incumbent-script>incumbent script</a>.</p>
 
       <p>If the "<a href=#kill-a-worker>kill a worker</a>" or "<a href=#terminate-a-worker>terminate a
       worker</a>" algorithms abort the script then abort all these
@@ -82085,7 +82108,7 @@
     <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
     default action. The <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute must be
     initialized to the value of <var title="">message clone</var>, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
-    <a href=#origin>origin</a> of the script that invoked the method, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be initialized to the
+    <a href=#origin>origin</a> of the <a href=#incumbent-script>incumbent script</a>, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be initialized to the
     <a href="#script's-global-object">script's global object</a>'s <code><a href=#windowproxy>WindowProxy</a></code> object, and the <code title=dom-MessageEvent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute must be initialized to the <var title="">new ports</var> array.
     </p> <!-- invariant: the global object is always a Window if the
     script can see this method -->
@@ -83729,7 +83752,7 @@
   <p><a href=#raw-text-elements>Raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a>, though it has <a href=#cdata-rcdata-restrictions>restrictions</a> described
   below.</p>
 
-  <p><a href=#escapable-raw-text-elements>escapable raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a> and <a href=#syntax-charref title=syntax-charref>character references</a>, but the text
+  <p><a href=#escapable-raw-text-elements>Escapable raw text elements</a> can have <a href=#syntax-text title=syntax-text>text</a> and <a href=#syntax-charref title=syntax-charref>character references</a>, but the text
   must not contain an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous ampersand</a>.
   There are also <a href=#cdata-rcdata-restrictions>further
   restrictions</a> described below.</p>

Modified: source
===================================================================
--- source	2013-06-11 18:24:52 UTC (rev 7953)
+++ source	2013-06-11 21:45:24 UTC (rev 7954)
@@ -72640,11 +72640,12 @@
   navigated to another domain.</p>
 
   <hr>
+<!--CLEANUP-->
 
   <p>The <dfn title="dom-window-close"><code>close()</code></dfn> method on <code>Window</code>
   objects should, if the corresponding <span>browsing context</span> <var title="">A</var> is
   <span>script-closable</span> and the <span title="script's browsing context">browsing
-  context</span> of the <span title="concept-script">script</span> that invokes the method is
+  context</span> of the <span>incumbent script</span> is
   <span>allowed to navigate</span> the <span>browsing context</span> <var title="">A</var>, <span
   title="close a browsing context">close</span> the <span>browsing context</span> <var
   title="">A</var>.</p>
@@ -73200,13 +73201,14 @@
      <dd>
 
       <p>The <span>origin</span> is an <span title="concept-origin-alias">alias</span> to the
-      <span>origin</span> of the <code>Document</code> or script that initiated the <span
+      <span>origin</span> of the <span>incumbent script</span> when
+      the <span>navigate</span> algorithm was invoked, or, if no <span title="concept-script">script</span>
+      was involved, of the <code>Document</code> of the element that initiated the <span
       title="navigate">navigation</span> to that <span>URL</span>.</p>
 
       <p>The <span>effective script origin</span> is initially an <span
-      title="concept-origin-alias">alias</span> to the <span>effective script origin</span> of the
-      <code>Document</code> or script that initiated the <span title="navigate">navigation</span> to
-      that <span>URL</span>.</p>
+      title="concept-origin-alias">alias</span> to the <span>effective script origin</span> of that same <span title="concept-script">script</span> or
+      <code>Document</code>.</p>
 
      </dd>
 
@@ -73367,7 +73369,7 @@
 
      <dt>If a script is a function or other code reference created by another script</dt>
 
-     <dd>The owner is the script that created it.</dd>
+     <dd>The owner is the <span>incumbent script</span> when the function or other code reference was created.</dd>
 
 
      <dt>If a script is a <span title="javascript protocol"><code title="">javascript:</code>
@@ -73411,7 +73413,7 @@
      URL</span> to which a <span>browsing context</span> is being <span
      title="navigate">navigated</span>, the URL having been provided by script</dt>
 
-     <dd>The owner is the script that provided the URL.</dd>
+     <dd>The owner is the <span>incumbent script</span> when the <span>navigate</span> algorithm was invoked.</dd>
 
     </dl>
 
@@ -74695,7 +74697,7 @@
 
   <p>Navigation for the <code title="dom-location-assign">assign()</code> and <code
   title="dom-location-replace">replace()</code> methods must be done with the <span title="script's
-  browsing context">browsing context</span> of the script that invoked the method as the
+  browsing context">browsing context</span> of the <span>incumbent script</span> as the
   <span>source browsing context</span>.</p>
 
   <p>If the <span title="resolve a url">resolving</span> step of the <code
@@ -79274,6 +79276,16 @@
   no <span>entry script</span>. It is changed by the <span>jump to a code entry-point</span>
   algorithm above.</p>
 
+<!--CLEANUP:all occurrences of 'incumbent'-->
+  <p>The <dfn>incumbent script</dfn> is the <span title="concept-script">script</span> corresponding
+  to the most-recently evaluated <i>SourceElements</i> JavaScript production whose evaluation
+  directly resulted in the invocation of the current API (method, attribute getter or setter,
+  constructor, etc).</p>
+  <!-- the <span title="concept-script">script</span> that invoked the current API -->
+  <!-- the <span title="concept-script">script</span> corresponding to the top execution context on the logical JavaScript execution context stack, also known as the running execution context -->
+
+  <hr>
+
   <p>Each <span>unit of related similar-origin browsing contexts</span> has a <dfn>running mutation
   observers</dfn> flag, which must initially be false. It is used to prevent reentrant invocation of
   the algorithm to <span title="concept-mo-invoke">invoke <code>MutationObserver</code>
@@ -81659,8 +81671,8 @@
    <li>
 
     <p>If the <span>active sandboxing flag set</span> of the <span>active document</span> of the
-    <span title="script's browsing context">browsing context</span> of the <span
-    title="concept-script">script</span> that invoked the method has its <span>sandboxed auxiliary
+    <span title="script's browsing context">browsing context</span> of the <span>incumbent
+    script</span> has its <span>sandboxed auxiliary
     navigation browsing context flag</span> set, then return the empty string and abort these
     steps.</p>
 
@@ -81668,6 +81680,15 @@
 
    <li>
 
+    <p>Let <var title="">incumbent origin</var> be the <span>effective origin</span> of the
+    <span>incumbent script</span> at the time the <code
+    title="dom-showModalDialog">showModalDialog()</code> method was called.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
     <p>Let <var title="">the list of background browsing
     contexts</var> be a list of all the browsing contexts that:</p>
 
@@ -81678,10 +81699,7 @@
      title="dom-showModalDialog">showModalDialog()</code> method was called, and that</li>
 
      <li>have an <span>active document</span> whose <span>origin</span> is the <span title="same
-     origin">same</span> as the <span>origin</span> of the <span
-     title="concept-script">script</span> that called the <code
-     title="dom-showModalDialog">showModalDialog()</code> method at the time the method was
-     called,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
+     origin">same</span> as <var title="">incumbent origin</var>,</li> <!-- Note that changing document.domain to talk to another domain doesn't make you
      able to block that domain -->
 
     </ul>
@@ -81718,10 +81736,10 @@
 
     <p>Set all the flags in the new browsing context's <span>popup sandboxing flag set</span> that
     are set in the <span>active sandboxing flag set</span> of the <span>active document</span> of
-    the <span title="script's browsing context">browsing context</span> of the <span
-    title="concept-script">script</span> that invoked the method. The <span title="script's browsing
-    context">browsing context</span> of the <span title="concept-script">script</span> that invoked
-    the method must be set as the new browsing context's <span>one permitted sandboxed
+    the <span title="script's browsing context">browsing context</span> of the <span>incumbent
+    script</span>. The <span title="script's browsing
+    context">browsing context</span> of the <span>incumbent script</span>
+    must be set as the new browsing context's <span>one permitted sandboxed
     navigator</span>.</p>
 
    </li>
@@ -81735,9 +81753,7 @@
 
    <li>
 
-    <p>Let the <span>dialog arguments' origin</span> be the <span>origin</span> of the <span
-    title="concept-script">script</span> that called the <code
-    title="dom-showModalDialog">showModalDialog()</code> method.</p>
+    <p>Let the <span>dialog arguments' origin</span> be <var title="">incumbent origin</var>.</p>
 
    </li>
 
@@ -81746,8 +81762,8 @@
     <p><span>Navigate</span><!--DONAV showModalDialog--> the new <span>browsing context</span> to
     the <span>absolute URL</span> that resulted from <span title="resolve a url">resolving</span>
     <var title="">url</var> earlier, with <span>replacement enabled</span>, and with the <span
-    title="script's browsing context">browsing context</span> of the <span
-    title="concept-script">script</span> that invoked the method as the <span>source browsing
+    title="script's browsing context">browsing context</span> of the <span>incumbent
+    script</span> as the <span>source browsing
     context</span>.</p>
 
    </li>
@@ -88020,7 +88036,7 @@
 
   <p class="note">For <span title="data protocol"><code
   title="">data:</code> URLs</span>, this is the <span>origin</span>
-  of the <span>entry script</span> that called the constructor. For
+  of the <span>entry script</span> when the constructor was called. For
   other <span title="URL">URLs</span>, this is the <span>origin</span>
   of the value of the <span>absolute URL</span> given in the worker's
   <code title="dom-WorkerGlobalScope-location"></code> attribute.</p>
@@ -88678,8 +88694,8 @@
    scope</var>. Let <var title="">worker</var> be this new object.</p></li>
 
    <li><p><span>Create a new <code>MessagePort</code> object</span> owned by the <span
-   title="script's global object">global object</span> of the <span
-   title="concept-script">script</span> that invoked the constructor. Let this be the <var
+   title="script's global object">global object</span> of the <span>incumbent script</span>.
+   Let this be the <var
    title="">outside port</var>.</p></li>
 
    <li><p>Associate the <var title="">outside port</var> with <var title="">worker</var>.</p></li>
@@ -88704,8 +88720,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <span>list of relevant <code>Document</code> objects to
-    add</span> given the <span title="script's global object">global object</span> of the <span
-    title="concept-script">script</span> that invoked the constructor.</p>
+    add</span> given the <span title="script's global object">global object</span> of the <span>incumbent
+    script</span>.</p>
 
    </li>
 
@@ -88719,22 +88735,21 @@
 
    <li>
 
-    <p>If the <span title="script's global object">global object</span> of the <span
-    title="concept-script">script</span> that invoked the constructor is a
+    <p>If the <span title="script's global object">global object</span> of the <span>incumbent
+    script</span> is a
     <code>WorkerGlobalScope</code> object (i.e. we are creating a nested worker), add <var
     title="">worker global scope</var> to the list of <span>the worker's workers</span> of the
     <code>WorkerGlobalScope</code> object that is the <span title="script's global object">global
-    object</span> of the <span title="concept-script">script</span> that invoked the
-    constructor.</p>
+    object</span> of the <span>incumbent script</span>.</p>
 
    </li>
 
    <li>
 
     <p><span>Run a worker</span> for the resulting <span>absolute URL</span>, with the
-    <span>script's browsing context</span> of the script that invoked the method as the <var
-    title="">owner browsing context</var>, with the <span>script's document</span> of the script
-    that invoked the method as the <var title="">owner document</var>, with the <span>origin</span>
+    <span>script's browsing context</span> of the <span>incumbent script</span> as the <var
+    title="">owner browsing context</var>, with the <span>script's document</span> of the
+    <span>incumbent script</span> as the <var title="">owner document</var>, with the <span>origin</span>
     of the <span>entry script</span> as the <var title="">owner origin</var>, and with <var
     title="">worker global scope</var> as the global scope.</p>
 
@@ -88796,8 +88811,8 @@
    <li>
 
     <p>Let <var title="">docs</var> be the <span>list of relevant <code>Document</code> objects to
-    add</span> given the <span title="script's global object">global object</span> of the <span
-    title="concept-script">script</span> that invoked the constructor.</p>
+    add</span> given the <span title="script's global object">global object</span> of the <span>incumbent
+    script</span>.</p>
 
    </li>
 
@@ -88812,7 +88827,7 @@
      title="">worker</var>.</p></li>
 
      <li><p><span>Create a new <code>MessagePort</code> object</span> owned by the <span
-     title="script's global object">global object</span> of the script that invoked the method. Let
+     title="script's global object">global object</span> of the <span>incumbent script</span>. Let
      this be the <var title="">outside port</var>.</p></li>
 
      <li><p>Assign <var title="">outside port</var> to the <code
@@ -88843,8 +88858,8 @@
      <li>
 
       <p>If <var title="">worker global scope</var> is not null, but the user agent has been
-      configured to disallow communication between the <span title="concept-script">script</span>
-      that invoked the constructor and the worker represented by the <var title="">worker global
+      configured to disallow communication between the <span>incumbent script</span>
+      and the worker represented by the <var title="">worker global
       scope</var>, then set <var title="">worker global scope</var> to null.</p>
 
       <p class="note">For example, a user agent could have a development mode that isolates a
@@ -88896,12 +88911,12 @@
 
        <li>
 
-        <p>If the <span title="script's global object">global object</span> of the <span
-        title="concept-script">script</span> that invoked the constructor is a
+        <p>If the <span title="script's global object">global object</span> of the <span>incumbent
+        script</span> is a
         <code>WorkerGlobalScope</code> object, add <var title="">worker global scope</var> to the
         list of <span>the worker's workers</span> of the <code>WorkerGlobalScope</code> object that
-        is the <span title="script's global object">global object</span> of the <span
-        title="concept-script">script</span> that invoked the constructor.</p>
+        is the <span title="script's global object">global object</span> of the <span>incumbent
+        script</span>.</p>
 
        </li>
 
@@ -88954,20 +88969,19 @@
 
    <li>
 
-    <p>If the <span title="script's global object">global object</span> of the <span
-    title="concept-script">script</span> that invoked the constructor is a
+    <p>If the <span title="script's global object">global object</span> of the <span>incumbent
+    script</span> that invoked the constructor is a
     <code>WorkerGlobalScope</code> object, add <var title="">worker global scope</var> to the list
     of <span>the worker's workers</span> of the <code>WorkerGlobalScope</code> object that is the
-    <span title="script's global object">global object</span> of the <span
-    title="concept-script">script</span> that invoked the constructor.</p>
+    <span title="script's global object">global object</span> of the <span>incumbent script</span>.</p>
 
    </li>
 
    <li>
 
     <p><span>Run a worker</span> for <var title="">scriptURL</var>, with the <span>script's browsing
-    context</span> of the script that invoked the method as the <var title="">owner browsing
-    context</var>, with the <span>script's document</span> of the script that invoked the method as
+    context</span> of the <span>incumbent script</span> as the <var title="">owner browsing
+    context</var>, with the <span>script's document</span> of the <span>incumbent script</span>
     the <var title="">owner document</var>, with the <span>origin</span> of the <span>entry
     script</span> as the <var title="">owner origin</var>, and with <var title="">worker global
     scope</var> as the global scope.</p>
@@ -89089,10 +89103,7 @@
 
       <p>If an exception was thrown or if the script was prematurely
       aborted, then abort all these steps, letting the exception or
-      aborting continue to be processed by the script that called the
-      <code
-      title="dom-WorkerGlobalScope-importScripts">importScripts()</code>
-      method.</p>
+      aborting continue to be processed by the <span>incumbent script</span>.</p>
 
       <p>If the "<span>kill a worker</span>" or "<span>terminate a
       worker</span>" algorithms abort the script then abort all these
@@ -91568,7 +91579,7 @@
     initialized to the value of <var title="">message clone</var>, the <code
     title="dom-MessageEvent-origin">origin</code> attribute must be initialized to the <span
     title="Unicode serialization of an origin">Unicode serialization</span> of the
-    <span>origin</span> of the script that invoked the method, the <code
+    <span>origin</span> of the <span>incumbent script</span>, the <code
     title="dom-MessageEvent-source">source</code> attribute must be initialized to the
     <span>script's global object</span>'s <code>WindowProxy</code> object, and the <code
     title="dom-MessageEvent-ports">ports</code> attribute must be initialized to the <var
@@ -93426,7 +93437,7 @@
   href="#cdata-rcdata-restrictions">restrictions</a> described
   below.</p>
 
-  <p><span>escapable raw text elements</span> can have <span
+  <p><span>Escapable raw text elements</span> can have <span
   title="syntax-text">text</span> and <span
   title="syntax-charref">character references</span>, but the text
   must not contain an <span




More information about the Commit-Watchers mailing list