[html5] r2727 - [giow] (2) Change from the 'prevent scripts from running when documents are acti [...]

whatwg at whatwg.org whatwg at whatwg.org
Sat Jan 31 02:22:10 PST 2009


Author: ianh
Date: 2009-01-31 02:22:09 -0800 (Sat, 31 Jan 2009)
New Revision: 2727

Modified:
   index
   source
Log:
[giow] (2) Change from the 'prevent scripts from running when documents are active' model to the 'split window' model, as it has better performance characteristics.

Modified: index
===================================================================
--- index	2009-01-30 08:39:28 UTC (rev 2726)
+++ index	2009-01-31 10:22:09 UTC (rev 2727)
@@ -34,7 +34,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 30 January 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 31 January 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -659,157 +659,158 @@
      <li><a href=#security-1><span class=secno>5.1.4 </span>Security</a></li>
      <li><a href=#groupings-of-browsing-contexts><span class=secno>5.1.5 </span>Groupings of browsing contexts</a></li>
      <li><a href=#browsing-context-names><span class=secno>5.1.6 </span>Browsing context names</a></ol></li>
-   <li><a href=#the-default-view><span class=secno>5.2 </span>The default view</a>
+   <li><a href=#the-windowproxy-object><span class=secno>5.2 </span>The <code>WindowProxy</code> object</a></li>
+   <li><a href=#the-window-object><span class=secno>5.3 </span>The <code>Window</code> object</a>
     <ol>
-     <li><a href=#security-2><span class=secno>5.2.1 </span>Security</a></li>
-     <li><a href=#apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.2.2 </span>APIs for creating and navigating browsing contexts by name</a></li>
-     <li><a href=#accessing-other-browsing-contexts><span class=secno>5.2.3 </span>Accessing other browsing contexts</a></li>
-     <li><a href=#garbage-collection-and-browsing-contexts><span class=secno>5.2.4 </span>Garbage collection and browsing contexts</a></li>
-     <li><a href=#named-access-on-the-window-object><span class=secno>5.2.5 </span>Named access on the <code>Window</code> object</a></li>
-     <li><a href=#browser-interface-elements><span class=secno>5.2.6 </span>Browser interface elements</a></ol></li>
-   <li><a href=#origin><span class=secno>5.3 </span>Origin</a>
+     <li><a href=#security-2><span class=secno>5.3.1 </span>Security</a></li>
+     <li><a href=#apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.3.2 </span>APIs for creating and navigating browsing contexts by name</a></li>
+     <li><a href=#accessing-other-browsing-contexts><span class=secno>5.3.3 </span>Accessing other browsing contexts</a></li>
+     <li><a href=#garbage-collection-and-browsing-contexts><span class=secno>5.3.4 </span>Garbage collection and browsing contexts</a></li>
+     <li><a href=#named-access-on-the-window-object><span class=secno>5.3.5 </span>Named access on the <code>Window</code> object</a></li>
+     <li><a href=#browser-interface-elements><span class=secno>5.3.6 </span>Browser interface elements</a></ol></li>
+   <li><a href=#origin><span class=secno>5.4 </span>Origin</a>
     <ol>
-     <li><a href=#relaxing-the-same-origin-restriction><span class=secno>5.3.1 </span>Relaxing the same-origin restriction</a></ol></li>
-   <li><a href=#scripting><span class=secno>5.4 </span>Scripting</a>
+     <li><a href=#relaxing-the-same-origin-restriction><span class=secno>5.4.1 </span>Relaxing the same-origin restriction</a></ol></li>
+   <li><a href=#scripting><span class=secno>5.5 </span>Scripting</a>
     <ol>
-     <li><a href=#introduction-0><span class=secno>5.4.1 </span>Introduction</a></li>
-     <li><a href=#enabling-and-disabling-scripting><span class=secno>5.4.2 </span>Enabling and disabling scripting</a></li>
-     <li><a href=#processing-model-1><span class=secno>5.4.3 </span>Processing model</a>
+     <li><a href=#introduction-0><span class=secno>5.5.1 </span>Introduction</a></li>
+     <li><a href=#enabling-and-disabling-scripting><span class=secno>5.5.2 </span>Enabling and disabling scripting</a></li>
+     <li><a href=#processing-model-1><span class=secno>5.5.3 </span>Processing model</a>
       <ol>
-       <li><a href=#definitions-0><span class=secno>5.4.3.1 </span>Definitions</a></li>
-       <li><a href=#calling-scripts><span class=secno>5.4.3.2 </span>Calling scripts</a></li>
-       <li><a href=#creating-scripts><span class=secno>5.4.3.3 </span>Creating scripts</a></li>
-       <li><a href=#killing-scripts><span class=secno>5.4.3.4 </span>Killing scripts</a></ol></li>
-     <li><a href=#event-loops><span class=secno>5.4.4 </span>Event loops</a>
+       <li><a href=#definitions-0><span class=secno>5.5.3.1 </span>Definitions</a></li>
+       <li><a href=#calling-scripts><span class=secno>5.5.3.2 </span>Calling scripts</a></li>
+       <li><a href=#creating-scripts><span class=secno>5.5.3.3 </span>Creating scripts</a></li>
+       <li><a href=#killing-scripts><span class=secno>5.5.3.4 </span>Killing scripts</a></ol></li>
+     <li><a href=#event-loops><span class=secno>5.5.4 </span>Event loops</a>
       <ol>
-       <li><a href=#generic-task-sources><span class=secno>5.4.4.1 </span>Generic task sources</a></ol></li>
-     <li><a href=#javascript-protocol><span class=secno>5.4.5 </span>The <code title="">javascript:</code> protocol</a></li>
-     <li><a href=#events><span class=secno>5.4.6 </span>Events</a>
+       <li><a href=#generic-task-sources><span class=secno>5.5.4.1 </span>Generic task sources</a></ol></li>
+     <li><a href=#javascript-protocol><span class=secno>5.5.5 </span>The <code title="">javascript:</code> protocol</a></li>
+     <li><a href=#events><span class=secno>5.5.6 </span>Events</a>
       <ol>
-       <li><a href=#event-handler-attributes><span class=secno>5.4.6.1 </span>Event handler attributes</a></li>
-       <li><a href=#event-handler-attributes-on-elements-and-on-window-objects><span class=secno>5.4.6.2 </span>Event handler attributes on elements and on <code>Window</code> objects</a></li>
-       <li><a href=#event-firing><span class=secno>5.4.6.3 </span>Event firing</a></li>
-       <li><a href=#events-and-the-window-object><span class=secno>5.4.6.4 </span>Events and the <code>Window</code> object</a></li>
-       <li><a href=#runtime-script-errors><span class=secno>5.4.6.5 </span>Runtime script errors</a></ol></ol></li>
-   <li><a href=#user-prompts><span class=secno>5.5 </span>User prompts</a>
+       <li><a href=#event-handler-attributes><span class=secno>5.5.6.1 </span>Event handler attributes</a></li>
+       <li><a href=#event-handler-attributes-on-elements-and-on-window-objects><span class=secno>5.5.6.2 </span>Event handler attributes on elements and on <code>Window</code> objects</a></li>
+       <li><a href=#event-firing><span class=secno>5.5.6.3 </span>Event firing</a></li>
+       <li><a href=#events-and-the-window-object><span class=secno>5.5.6.4 </span>Events and the <code>Window</code> object</a></li>
+       <li><a href=#runtime-script-errors><span class=secno>5.5.6.5 </span>Runtime script errors</a></ol></ol></li>
+   <li><a href=#user-prompts><span class=secno>5.6 </span>User prompts</a>
     <ol>
-     <li><a href=#simple-dialogs><span class=secno>5.5.1 </span>Simple dialogs</a></li>
-     <li><a href=#printing><span class=secno>5.5.2 </span>Printing</a></li>
-     <li><a href=#dialogs-implemented-using-separate-documents><span class=secno>5.5.3 </span>Dialogs implemented using separate documents</a></ol></li>
-   <li><a href=#system-state-and-capabilities><span class=secno>5.6 </span>System state and capabilities</a>
+     <li><a href=#simple-dialogs><span class=secno>5.6.1 </span>Simple dialogs</a></li>
+     <li><a href=#printing><span class=secno>5.6.2 </span>Printing</a></li>
+     <li><a href=#dialogs-implemented-using-separate-documents><span class=secno>5.6.3 </span>Dialogs implemented using separate documents</a></ol></li>
+   <li><a href=#system-state-and-capabilities><span class=secno>5.7 </span>System state and capabilities</a>
     <ol>
-     <li><a href=#client-identification><span class=secno>5.6.1 </span>Client identification</a></li>
-     <li><a href=#custom-handlers><span class=secno>5.6.2 </span>Custom protocol and content handlers</a>
+     <li><a href=#client-identification><span class=secno>5.7.1 </span>Client identification</a></li>
+     <li><a href=#custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</a>
       <ol>
-       <li><a href=#security-and-privacy><span class=secno>5.6.2.1 </span>Security and privacy</a></li>
-       <li><a href=#sample-handler-impl><span class=secno>5.6.2.2 </span>Sample user interface</a></ol></ol></li>
-   <li><a href=#offline><span class=secno>5.7 </span>Offline Web applications</a>
+       <li><a href=#security-and-privacy><span class=secno>5.7.2.1 </span>Security and privacy</a></li>
+       <li><a href=#sample-handler-impl><span class=secno>5.7.2.2 </span>Sample user interface</a></ol></ol></li>
+   <li><a href=#offline><span class=secno>5.8 </span>Offline Web applications</a>
     <ol>
-     <li><a href=#introduction-1><span class=secno>5.7.1 </span>Introduction</a></li>
-     <li><a href=#appcache><span class=secno>5.7.2 </span>Application caches</a></li>
-     <li><a href=#manifests><span class=secno>5.7.3 </span>The cache manifest syntax</a>
+     <li><a href=#introduction-1><span class=secno>5.8.1 </span>Introduction</a></li>
+     <li><a href=#appcache><span class=secno>5.8.2 </span>Application caches</a></li>
+     <li><a href=#manifests><span class=secno>5.8.3 </span>The cache manifest syntax</a>
       <ol>
-       <li><a href=#a-sample-manifest><span class=secno>5.7.3.1 </span>A sample manifest</a></li>
-       <li><a href=#writing-cache-manifests><span class=secno>5.7.3.2 </span>Writing cache manifests</a></li>
-       <li><a href=#parsing-cache-manifests><span class=secno>5.7.3.3 </span>Parsing cache manifests</a></ol></li>
-     <li><a href=#updating-an-application-cache><span class=secno>5.7.4 </span>Updating an application cache</a></li>
-     <li><a href=#matching-a-fallback-namespace><span class=secno>5.7.5 </span>Matching a fallback namespace</a></li>
-     <li><a href=#the-application-cache-selection-algorithm><span class=secno>5.7.6 </span>The application cache selection algorithm</a>
+       <li><a href=#a-sample-manifest><span class=secno>5.8.3.1 </span>A sample manifest</a></li>
+       <li><a href=#writing-cache-manifests><span class=secno>5.8.3.2 </span>Writing cache manifests</a></li>
+       <li><a href=#parsing-cache-manifests><span class=secno>5.8.3.3 </span>Parsing cache manifests</a></ol></li>
+     <li><a href=#updating-an-application-cache><span class=secno>5.8.4 </span>Updating an application cache</a></li>
+     <li><a href=#matching-a-fallback-namespace><span class=secno>5.8.5 </span>Matching a fallback namespace</a></li>
+     <li><a href=#the-application-cache-selection-algorithm><span class=secno>5.8.6 </span>The application cache selection algorithm</a>
       <ol>
-       <li><a href=#changesToNetworkingModel><span class=secno>5.7.6.1 </span>Changes to the networking model</a></ol></li>
-     <li><a href=#application-cache-api><span class=secno>5.7.7 </span>Application cache API</a></li>
-     <li><a href=#browser-state><span class=secno>5.7.8 </span>Browser state</a></ol></li>
-   <li><a href=#history><span class=secno>5.8 </span>Session history and navigation</a>
+       <li><a href=#changesToNetworkingModel><span class=secno>5.8.6.1 </span>Changes to the networking model</a></ol></li>
+     <li><a href=#application-cache-api><span class=secno>5.8.7 </span>Application cache API</a></li>
+     <li><a href=#browser-state><span class=secno>5.8.8 </span>Browser state</a></ol></li>
+   <li><a href=#history><span class=secno>5.9 </span>Session history and navigation</a>
     <ol>
-     <li><a href=#the-session-history-of-browsing-contexts><span class=secno>5.8.1 </span>The session history of browsing contexts</a></li>
-     <li><a href=#the-history-interface><span class=secno>5.8.2 </span>The <code>History</code> interface</a></li>
-     <li><a href=#activating-state-object-entries><span class=secno>5.8.3 </span>Activating state object entries</a></li>
-     <li><a href=#the-location-interface><span class=secno>5.8.4 </span>The <code>Location</code> interface</a>
+     <li><a href=#the-session-history-of-browsing-contexts><span class=secno>5.9.1 </span>The session history of browsing contexts</a></li>
+     <li><a href=#the-history-interface><span class=secno>5.9.2 </span>The <code>History</code> interface</a></li>
+     <li><a href=#activating-state-object-entries><span class=secno>5.9.3 </span>Activating state object entries</a></li>
+     <li><a href=#the-location-interface><span class=secno>5.9.4 </span>The <code>Location</code> interface</a>
       <ol>
-       <li><a href=#security-3><span class=secno>5.8.4.1 </span>Security</a></ol></li>
-     <li><a href=#history-notes><span class=secno>5.8.5 </span>Implementation notes for session history</a></ol></li>
-   <li><a href=#browsing-the-web><span class=secno>5.9 </span>Browsing the Web</a>
+       <li><a href=#security-3><span class=secno>5.9.4.1 </span>Security</a></ol></li>
+     <li><a href=#history-notes><span class=secno>5.9.5 </span>Implementation notes for session history</a></ol></li>
+   <li><a href=#browsing-the-web><span class=secno>5.10 </span>Browsing the Web</a>
     <ol>
-     <li><a href=#navigating-across-documents><span class=secno>5.9.1 </span>Navigating across documents</a></li>
-     <li><a href=#read-html><span class=secno>5.9.2 </span>Page load processing model for HTML files</a></li>
-     <li><a href=#read-xml><span class=secno>5.9.3 </span>Page load processing model for XML files</a></li>
-     <li><a href=#read-text><span class=secno>5.9.4 </span>Page load processing model for text files</a></li>
-     <li><a href=#read-image><span class=secno>5.9.5 </span>Page load processing model for images</a></li>
-     <li><a href=#read-plugin><span class=secno>5.9.6 </span>Page load processing model for content that uses plugins</a></li>
-     <li><a href=#read-ua-inline><span class=secno>5.9.7 </span>Page load processing model for inline content that doesn't have a DOM</a></li>
-     <li><a href=#scroll-to-fragid><span class=secno>5.9.8 </span>Navigating to a fragment identifier</a></li>
-     <li><a href=#history-traversal><span class=secno>5.9.9 </span>History traversal</a></li>
-     <li><a href=#unloading-documents><span class=secno>5.9.10 </span>Unloading documents</a>
+     <li><a href=#navigating-across-documents><span class=secno>5.10.1 </span>Navigating across documents</a></li>
+     <li><a href=#read-html><span class=secno>5.10.2 </span>Page load processing model for HTML files</a></li>
+     <li><a href=#read-xml><span class=secno>5.10.3 </span>Page load processing model for XML files</a></li>
+     <li><a href=#read-text><span class=secno>5.10.4 </span>Page load processing model for text files</a></li>
+     <li><a href=#read-image><span class=secno>5.10.5 </span>Page load processing model for images</a></li>
+     <li><a href=#read-plugin><span class=secno>5.10.6 </span>Page load processing model for content that uses plugins</a></li>
+     <li><a href=#read-ua-inline><span class=secno>5.10.7 </span>Page load processing model for inline content that doesn't have a DOM</a></li>
+     <li><a href=#scroll-to-fragid><span class=secno>5.10.8 </span>Navigating to a fragment identifier</a></li>
+     <li><a href=#history-traversal><span class=secno>5.10.9 </span>History traversal</a></li>
+     <li><a href=#unloading-documents><span class=secno>5.10.10 </span>Unloading documents</a>
       <ol>
-       <li><a href=#event-definition><span class=secno>5.9.10.1 </span>Event definition</a></ol></ol></li>
-   <li><a href=#structured-client-side-storage><span class=secno>5.10 </span>Structured client-side storage</a>
+       <li><a href=#event-definition><span class=secno>5.10.10.1 </span>Event definition</a></ol></ol></li>
+   <li><a href=#structured-client-side-storage><span class=secno>5.11 </span>Structured client-side storage</a>
     <ol>
-     <li><a href=#storage><span class=secno>5.10.1 </span>Storing name/value pairs</a>
+     <li><a href=#storage><span class=secno>5.11.1 </span>Storing name/value pairs</a>
       <ol>
-       <li><a href=#introduction-2><span class=secno>5.10.1.1 </span>Introduction</a></li>
-       <li><a href=#the-storage-interface><span class=secno>5.10.1.2 </span>The <code>Storage</code> interface</a></li>
-       <li><a href=#the-sessionstorage-attribute><span class=secno>5.10.1.3 </span>The <code title=dom-sessionStorage>sessionStorage</code> attribute</a></li>
-       <li><a href=#the-localstorage-attribute><span class=secno>5.10.1.4 </span>The <code title=dom-localStorage>localStorage</code> attribute</a></li>
-       <li><a href=#the-storage-event><span class=secno>5.10.1.5 </span>The <code title=event-storage>storage</code> event</a>
+       <li><a href=#introduction-2><span class=secno>5.11.1.1 </span>Introduction</a></li>
+       <li><a href=#the-storage-interface><span class=secno>5.11.1.2 </span>The <code>Storage</code> interface</a></li>
+       <li><a href=#the-sessionstorage-attribute><span class=secno>5.11.1.3 </span>The <code title=dom-sessionStorage>sessionStorage</code> attribute</a></li>
+       <li><a href=#the-localstorage-attribute><span class=secno>5.11.1.4 </span>The <code title=dom-localStorage>localStorage</code> attribute</a></li>
+       <li><a href=#the-storage-event><span class=secno>5.11.1.5 </span>The <code title=event-storage>storage</code> event</a>
         <ol>
-         <li><a href=#event-definition-0><span class=secno>5.10.1.5.1 </span>Event definition</a></ol></li>
-       <li><a href=#threads><span class=secno>5.10.1.6 </span>Threads</a></ol></li>
-     <li><a href=#sql><span class=secno>5.10.2 </span>Database storage</a>
+         <li><a href=#event-definition-0><span class=secno>5.11.1.5.1 </span>Event definition</a></ol></li>
+       <li><a href=#threads><span class=secno>5.11.1.6 </span>Threads</a></ol></li>
+     <li><a href=#sql><span class=secno>5.11.2 </span>Database storage</a>
       <ol>
-       <li><a href=#introduction-3><span class=secno>5.10.2.1 </span>Introduction</a></li>
-       <li><a href=#databases><span class=secno>5.10.2.2 </span>Databases</a></li>
-       <li><a href=#executing-sql-statements><span class=secno>5.10.2.3 </span>Executing SQL statements</a></li>
-       <li><a href=#database-query-results><span class=secno>5.10.2.4 </span>Database query results</a></li>
-       <li><a href=#errors><span class=secno>5.10.2.5 </span>Errors</a></li>
-       <li><a href=#processing-model-2><span class=secno>5.10.2.6 </span>Processing model</a></ol></li>
-     <li><a href=#disk-space><span class=secno>5.10.3 </span>Disk space</a></li>
-     <li><a href=#privacy><span class=secno>5.10.4 </span>Privacy</a>
+       <li><a href=#introduction-3><span class=secno>5.11.2.1 </span>Introduction</a></li>
+       <li><a href=#databases><span class=secno>5.11.2.2 </span>Databases</a></li>
+       <li><a href=#executing-sql-statements><span class=secno>5.11.2.3 </span>Executing SQL statements</a></li>
+       <li><a href=#database-query-results><span class=secno>5.11.2.4 </span>Database query results</a></li>
+       <li><a href=#errors><span class=secno>5.11.2.5 </span>Errors</a></li>
+       <li><a href=#processing-model-2><span class=secno>5.11.2.6 </span>Processing model</a></ol></li>
+     <li><a href=#disk-space><span class=secno>5.11.3 </span>Disk space</a></li>
+     <li><a href=#privacy><span class=secno>5.11.4 </span>Privacy</a>
       <ol>
-       <li><a href=#user-tracking><span class=secno>5.10.4.1 </span>User tracking</a></li>
-       <li><a href=#cookie-resurrection><span class=secno>5.10.4.2 </span>Cookie resurrection</a></ol></li>
-     <li><a href=#security-4><span class=secno>5.10.5 </span>Security</a>
+       <li><a href=#user-tracking><span class=secno>5.11.4.1 </span>User tracking</a></li>
+       <li><a href=#cookie-resurrection><span class=secno>5.11.4.2 </span>Cookie resurrection</a></ol></li>
+     <li><a href=#security-4><span class=secno>5.11.5 </span>Security</a>
       <ol>
-       <li><a href=#dns-spoofing-attacks><span class=secno>5.10.5.1 </span>DNS spoofing attacks</a></li>
-       <li><a href=#cross-directory-attacks><span class=secno>5.10.5.2 </span>Cross-directory attacks</a></li>
-       <li><a href=#implementation-risks><span class=secno>5.10.5.3 </span>Implementation risks</a></li>
-       <li><a href=#sql-and-user-agents><span class=secno>5.10.5.4 </span>SQL and user agents</a></li>
-       <li><a href=#sql-injection><span class=secno>5.10.5.5 </span>SQL injection</a></ol></ol></li>
-   <li><a href=#links><span class=secno>5.11 </span>Links</a>
+       <li><a href=#dns-spoofing-attacks><span class=secno>5.11.5.1 </span>DNS spoofing attacks</a></li>
+       <li><a href=#cross-directory-attacks><span class=secno>5.11.5.2 </span>Cross-directory attacks</a></li>
+       <li><a href=#implementation-risks><span class=secno>5.11.5.3 </span>Implementation risks</a></li>
+       <li><a href=#sql-and-user-agents><span class=secno>5.11.5.4 </span>SQL and user agents</a></li>
+       <li><a href=#sql-injection><span class=secno>5.11.5.5 </span>SQL injection</a></ol></ol></li>
+   <li><a href=#links><span class=secno>5.12 </span>Links</a>
     <ol>
-     <li><a href=#hyperlink-elements><span class=secno>5.11.1 </span>Hyperlink elements</a></li>
-     <li><a href=#following-hyperlinks><span class=secno>5.11.2 </span>Following hyperlinks</a>
+     <li><a href=#hyperlink-elements><span class=secno>5.12.1 </span>Hyperlink elements</a></li>
+     <li><a href=#following-hyperlinks><span class=secno>5.12.2 </span>Following hyperlinks</a>
       <ol>
-       <li><a href=#hyperlink-auditing><span class=secno>5.11.2.1 </span>Hyperlink auditing</a></ol></li>
-     <li><a href=#linkTypes><span class=secno>5.11.3 </span>Link types</a>
+       <li><a href=#hyperlink-auditing><span class=secno>5.12.2.1 </span>Hyperlink auditing</a></ol></li>
+     <li><a href=#linkTypes><span class=secno>5.12.3 </span>Link types</a>
       <ol>
-       <li><a href=#link-type-alternate><span class=secno>5.11.3.1 </span>Link type "<code>alternate</code>"</a></li>
-       <li><a href=#link-type-archives><span class=secno>5.11.3.2 </span>Link type "<code>archives</code>"</a></li>
-       <li><a href=#link-type-author><span class=secno>5.11.3.3 </span>Link type "<code>author</code>"</a></li>
-       <li><a href=#link-type-bookmark><span class=secno>5.11.3.4 </span>Link type "<code>bookmark</code>"</a></li>
-       <li><a href=#link-type-external><span class=secno>5.11.3.5 </span>Link type "<code>external</code>"</a></li>
-       <li><a href=#link-type-feed><span class=secno>5.11.3.6 </span>Link type "<code>feed</code>"</a></li>
-       <li><a href=#link-type-help><span class=secno>5.11.3.7 </span>Link type "<code>help</code>"</a></li>
-       <li><a href=#rel-icon><span class=secno>5.11.3.8 </span>Link type "<code>icon</code>"</a></li>
-       <li><a href=#link-type-license><span class=secno>5.11.3.9 </span>Link type "<code>license</code>"</a></li>
-       <li><a href=#link-type-nofollow><span class=secno>5.11.3.10 </span>Link type "<code>nofollow</code>"</a></li>
-       <li><a href=#link-type-noreferrer><span class=secno>5.11.3.11 </span>Link type "<code>noreferrer</code>"</a></li>
-       <li><a href=#link-type-pingback><span class=secno>5.11.3.12 </span>Link type "<code>pingback</code>"</a></li>
-       <li><a href=#link-type-prefetch><span class=secno>5.11.3.13 </span>Link type "<code>prefetch</code>"</a></li>
-       <li><a href=#link-type-search><span class=secno>5.11.3.14 </span>Link type "<code>search</code>"</a></li>
-       <li><a href=#link-type-stylesheet><span class=secno>5.11.3.15 </span>Link type "<code>stylesheet</code>"</a></li>
-       <li><a href=#link-type-sidebar><span class=secno>5.11.3.16 </span>Link type "<code>sidebar</code>"</a></li>
-       <li><a href=#link-type-tag><span class=secno>5.11.3.17 </span>Link type "<code>tag</code>"</a></li>
-       <li><a href=#hierarchical-link-types><span class=secno>5.11.3.18 </span>Hierarchical link types</a>
+       <li><a href=#link-type-alternate><span class=secno>5.12.3.1 </span>Link type "<code>alternate</code>"</a></li>
+       <li><a href=#link-type-archives><span class=secno>5.12.3.2 </span>Link type "<code>archives</code>"</a></li>
+       <li><a href=#link-type-author><span class=secno>5.12.3.3 </span>Link type "<code>author</code>"</a></li>
+       <li><a href=#link-type-bookmark><span class=secno>5.12.3.4 </span>Link type "<code>bookmark</code>"</a></li>
+       <li><a href=#link-type-external><span class=secno>5.12.3.5 </span>Link type "<code>external</code>"</a></li>
+       <li><a href=#link-type-feed><span class=secno>5.12.3.6 </span>Link type "<code>feed</code>"</a></li>
+       <li><a href=#link-type-help><span class=secno>5.12.3.7 </span>Link type "<code>help</code>"</a></li>
+       <li><a href=#rel-icon><span class=secno>5.12.3.8 </span>Link type "<code>icon</code>"</a></li>
+       <li><a href=#link-type-license><span class=secno>5.12.3.9 </span>Link type "<code>license</code>"</a></li>
+       <li><a href=#link-type-nofollow><span class=secno>5.12.3.10 </span>Link type "<code>nofollow</code>"</a></li>
+       <li><a href=#link-type-noreferrer><span class=secno>5.12.3.11 </span>Link type "<code>noreferrer</code>"</a></li>
+       <li><a href=#link-type-pingback><span class=secno>5.12.3.12 </span>Link type "<code>pingback</code>"</a></li>
+       <li><a href=#link-type-prefetch><span class=secno>5.12.3.13 </span>Link type "<code>prefetch</code>"</a></li>
+       <li><a href=#link-type-search><span class=secno>5.12.3.14 </span>Link type "<code>search</code>"</a></li>
+       <li><a href=#link-type-stylesheet><span class=secno>5.12.3.15 </span>Link type "<code>stylesheet</code>"</a></li>
+       <li><a href=#link-type-sidebar><span class=secno>5.12.3.16 </span>Link type "<code>sidebar</code>"</a></li>
+       <li><a href=#link-type-tag><span class=secno>5.12.3.17 </span>Link type "<code>tag</code>"</a></li>
+       <li><a href=#hierarchical-link-types><span class=secno>5.12.3.18 </span>Hierarchical link types</a>
         <ol>
-         <li><a href=#link-type-index><span class=secno>5.11.3.18.1 </span>Link type "<code>index</code>"</a></li>
-         <li><a href=#link-type-up><span class=secno>5.11.3.18.2 </span>Link type "<code>up</code>"</a></ol></li>
-       <li><a href=#sequential-link-types><span class=secno>5.11.3.19 </span>Sequential link types</a>
+         <li><a href=#link-type-index><span class=secno>5.12.3.18.1 </span>Link type "<code>index</code>"</a></li>
+         <li><a href=#link-type-up><span class=secno>5.12.3.18.2 </span>Link type "<code>up</code>"</a></ol></li>
+       <li><a href=#sequential-link-types><span class=secno>5.12.3.19 </span>Sequential link types</a>
         <ol>
-         <li><a href=#link-type-first><span class=secno>5.11.3.19.1 </span>Link type "<code>first</code>"</a></li>
-         <li><a href=#link-type-last><span class=secno>5.11.3.19.2 </span>Link type "<code>last</code>"</a></li>
-         <li><a href=#link-type-next><span class=secno>5.11.3.19.3 </span>Link type "<code>next</code>"</a></li>
-         <li><a href=#link-type-prev><span class=secno>5.11.3.19.4 </span>Link type "<code>prev</code>"</a></ol></li>
-       <li><a href=#other-link-types><span class=secno>5.11.3.20 </span>Other link types</a></ol></ol></ol></li>
+         <li><a href=#link-type-first><span class=secno>5.12.3.19.1 </span>Link type "<code>first</code>"</a></li>
+         <li><a href=#link-type-last><span class=secno>5.12.3.19.2 </span>Link type "<code>last</code>"</a></li>
+         <li><a href=#link-type-next><span class=secno>5.12.3.19.3 </span>Link type "<code>next</code>"</a></li>
+         <li><a href=#link-type-prev><span class=secno>5.12.3.19.4 </span>Link type "<code>prev</code>"</a></ol></li>
+       <li><a href=#other-link-types><span class=secno>5.12.3.20 </span>Other link types</a></ol></ol></ol></li>
  <li><a href=#editing><span class=secno>6 </span>User Interaction</a>
   <ol>
    <li><a href=#editing-intro><span class=secno>6.1 </span>Introduction</a></li>
@@ -5871,9 +5872,9 @@
 
   <div class=example>
 
-   <p>For example, the <code>document.defaultView</code> attribute
-   means that there is a strong reference from a <code>Document</code>
-   object to its <code><a href=#window>Window</a></code> object. Similarly, there is
+   <p>For example, the <code>document.location</code> attribute means
+   that there is a strong reference from a <code>Document</code>
+   object to its <code><a href=#location>Location</a></code> object. Similarly, there is
    always a strong reference from a <code>Document</code> to any
    descendant nodes, and from any node to its owner
    <code>Document</code>.</p>
@@ -5915,14 +5916,8 @@
   <code>DOMImplementation</code> object is initially an <a href=#xml-documents title="XML documents">XML document</a>, but can be made into an
   <a href=#html-documents title="HTML documents">HTML document</a> by calling <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> on it.</p>
 
-  <p>When a <code>Document</code> is first created, a new <a href=#script-group>script
-  group</a> must be created. This is the <code>Document</code>'s
-  <dfn id=current-script-group>current script group</dfn> until the script group is changed
-  (which can happen if <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> is invoked on the
-  <code>Document</code>).</p>
 
 
-
   <h4 id=documents-in-the-dom><span class=secno>3.2.1 </span>Documents in the DOM</h4>
 
   <p>All <code>Document</code> objects (in user agents implementing
@@ -5975,7 +5970,7 @@
   // <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
            attribute DOMString <a href=#dom-innerhtml title=dom-innerHTML>innerHTML</a>;
   <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>([Optional] in DOMString type, [Optional] in DOMString replace);
-  <a href=#window>Window</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
+  <a href=#windowproxy>WindowProxy</a> <a href=#dom-document-open title=dom-document-open>open</a>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
   void <a href=#dom-document-close title=dom-document-close>close</a>();
   void <a href=#dom-document-write title=dom-document-write>write</a>([Variadic] in DOMString text);
   void <a href=#dom-document-writeln title=dom-document-writeln>writeln</a>([Variadic] in DOMString text);
@@ -6433,9 +6428,9 @@
 
     <p>If <var title="">elements</var> has only one element, and that
     element is an <code><a href=#the-iframe-element>iframe</a></code> element, then return the
-    <code><a href=#window>Window</a></code> object of the <a href=#default-view>default view</a> of the
-    <a href=#nested-browsing-context>nested browsing context</a> represented by that
-    <code><a href=#the-iframe-element>iframe</a></code> element, and abort these steps.</p>
+    <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#nested-browsing-context>nested browsing
+    context</a> represented by that <code><a href=#the-iframe-element>iframe</a></code> element,
+    and abort these steps.</p>
 
    </li>
 
@@ -7744,21 +7739,24 @@
    XHTML, or image document, or something?</span></li><!-- XXX see
    also innerHTML in HTML -->
 
-   <li><p>Freeze the document's <a href=#current-script-group>current script group</a>, as
-   well as the <a href=#current-script-group>current script group</a> of any <a href=#active-document title="active document">active documents</a> in <a href=#nested-browsing-context title="nested browsing context">nested browsing
-   contexts</a>.</li>
-
    <li><p>Unregister all event listeners registered on the
    <code>Document</code> node and its descendants.</p>
 
    <li><p>Remove all child nodes of the document, without firing any
    mutation events.</li>
 
-   <li><p>Create a new <a href=#script-group>script group</a> and let the
-   document's <a href=#current-script-group>current script group</a> be that new
-   group. (The old script group is now permanently frozen.)</li>
+   <li><p>Replace the <code>Document</code>'s singleton objects with
+   new instances of those objects. (This includes in particular the
+   <code><a href=#window>Window</a></code>, <code><a href=#location>Location</a></code>, <code><a href=#history-1>History</a></code>,
+   <code><a href=#applicationcache>ApplicationCache</a></code>, <code><a href=#undomanager>UndoManager</a></code>,
+   <code><a href=#navigator>Navigator</a></code>, and <code><a href=#selection-0>Selection</a></code> objects, the
+   various <code><a href=#barprop>BarProp</a></code> objects, the two <code><a href=#storage-0>Storage</a></code>
+   objects, and the various <code><a href=#htmlcollection-0>HTMLCollection</a></code> objects. It
+   also includes all the WebIDL prototypes in the ECMAScript binding,
+   including the <code>Document</code> object's prototype.)</li>
 
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
 
    <li><p>Change the <a href="#document's-character-encoding">document's character encoding</a> to
    UTF-16.</li>
@@ -7835,12 +7833,10 @@
 
   </ol><p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
   <code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
-  interface of the object returned by the <code title=dom-document-defaultView>defaultView</code> attribute of the
-  <code>DocumentView</code> interface of the <code><a href=#htmldocument>HTMLDocument</a></code>
-  object, with the same arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
-  that method returned. If the <code title=dom-document-defaultView>defaultView</code> attribute of the
-  <code>DocumentView</code> interface of the <code><a href=#htmldocument>HTMLDocument</a></code>
-  object is null, then the method must raise an
+  object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
+  arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
+  that method returned. If the <code><a href=#htmldocument>HTMLDocument</a></code> object has no
+  <code><a href=#window>Window</a></code> object, then the method must raise an
   <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</p>
 
   <p>The <dfn id=dom-document-close title=dom-document-close><code>close()</code></dfn>
@@ -16125,7 +16121,7 @@
            attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;
 <!-- XXX we should bring these back since the Window spec has atrophied
   readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
-  readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
 -->};</pre>
     <p>Objects implementing the <code><a href=#htmliframeelement>HTMLIFrameElement</a></code>
     interface must also implement the <code>EmbeddingElement</code>
@@ -16146,8 +16142,9 @@
   <code><a href=#the-iframe-element>iframe</a></code> element's document's <a href=#browsing-context>browsing
   context</a> as the <a href=#source-browsing-context>source browsing context</a>. If the
   user <a href=#navigate title=navigate>navigates</a> away from this page,
-  the <code><a href=#the-iframe-element>iframe</a></code>'s corresponding <code><a href=#window>Window</a></code> object
-  will reference new <code>Document</code> objects, but the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute will not change.</p>
+  the <code><a href=#the-iframe-element>iframe</a></code>'s corresponding <code><a href=#windowproxy>WindowProxy</a></code>
+  object will proxy new <code><a href=#window>Window</a></code> objects for new
+  <code>Document</code> objects, but the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute will not change.</p>
 
   <p>Whenever the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute
   is set, the user agent must <a href=#resolve-a-url title="resolve a
@@ -16713,10 +16710,11 @@
            attribute DOMString <a href=#dom-object-usemap title=dom-object-useMap>useMap</a>;
   readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <a href=#dom-fae-form title=dom-fae-form>form</a>;
            attribute DOMString <a href=#dom-dim-width title=dom-dim-width>width</a>;
-           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;<!-- XXX
+           attribute DOMString <a href=#dom-dim-height title=dom-dim-height>height</a>;
+<!-- XXX we should bring these back since the Window spec has atrophied
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
-  readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
-};</pre>
+  readonly attribute <span>WindowProxy</span> <span title="dom-object-contentWindow">contentWindow</span>;
+-->};</pre>
     <p>Objects implementing the <code><a href=#htmlobjectelement>HTMLObjectElement</a></code>
     interface must also implement the <code>EmbeddingElement</code>
     interface defined in the Window Object specification. <a href=#refsWINDOW>[WINDOW]</a></p>
@@ -33184,26 +33182,39 @@
   requirements defined in this section <em>do</em> apply to all user
   agents, whether they are Web browsers or not.</p>
 
+
   <h3 id=windows><span class=secno>5.1 </span>Browsing contexts</h3>
 
-  <p>A <dfn id=browsing-context>browsing context</dfn> is a collection of one or more
-  <code>Document</code> objects, and one or more <a href=#view title=view>views</a>.</p>
+  <p>A <dfn id=browsing-context>browsing context</dfn> is an environment in which
+  <code>Document</code> objects are presented to the user. At any
+  time, one <code>Document</code> is designated the <dfn id=active-document>active
+  document</dfn>. The collection of <code>Document</code>s is the
+  <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session history</a>.</p>
 
-  <p>At any one time, one of the <code>Document</code>s in a
-  <a href=#browsing-context>browsing context</a> is the <dfn id=active-document>active document</dfn>. The
-  collection of <code>Document</code>s is the <a href=#browsing-context>browsing
-  context</a>'s <a href=#session-history>session history</a>.</p>
+  <p>Each <a href=#browsing-context>browsing context</a> has a corresponding
+  <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
 
+  <p>Each <code>Document</code> has a collection of one or more <a href=#view title=view>views</a>.</p>
+
   <p>A <dfn id=view>view</dfn> is a user agent interface tied to a particular
-  media used for the presentation of <code>Document</code> objects in
-  some media. A view may be interactive. Each view is represented by
-  an <code>AbstractView</code> object. Each view belongs to a
-  <a href=#browsing-context>browsing context</a>. <a href=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>
+  media used for the presentation of a particular
+  <code>Document</code> object in some media. A view may be
+  interactive. Each view is represented by an
+  <code>AbstractView</code> object. <a href=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>
 
+  <p>The main <a href=#view>view</a> through which a user primarily
+  interacts with a user agent is the <dfn id=default-view>default view</dfn>. The
+  <code>AbstractView</code> object that represents this view must also
+  implement the <code><a href=#window>Window</a></code> interface, and is referred to as
+  the <code>Document</code>'s <code><a href=#window>Window</a></code> object.</p>
+
+  <p class=note>The <a href=#default-view>default view</a> of a
+  <code>Document</code> is given by the <code title="">defaultView</code> attribute on the <code>Document</code>
+  object's <code>DocumentView</code> interface. <a href=#refsDOM3VIEWS>[DOM3VIEWS]</a></p>
+
   <p class=note>The <code title="">document</code> attribute of an
   <code>AbstractView</code> object representing a <a href=#view>view</a>
-  gives the <code>Document</code> object of the view's <a href=#browsing-context>browsing
-  context</a>'s <a href=#active-document>active document</a>. <a href=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>
+  gives the view's corresponding <code>Document</code> object. <a href=#refsDOM2VIEWS>[DOM2VIEWS]</a></p>
 
   <p class=note>Events that use the <code>UIEvent</code> interface
   are related to a specific <a href=#view>view</a> (the view in which the
@@ -33211,19 +33222,20 @@
   in the event object's <code title="">view</code> attribute. <a href=#refsDOM3EVENTS>[DOM3EVENTS]</a></p>
 
   <p class=note>A typical Web browser has one obvious
-  <a href=#view>view</a> per <a href=#browsing-context>browsing context</a>: the browser's
-  window (screen media). If a page is printed, however, a second view
-  becomes evident, that of the print media. The two views always share
-  the same underlying <code>Document</code>, but they have a different
-  presentation of that document. A speech browser also establishes a
-  browsing context, one with a view in the speech media.</p>
+  <a href=#view>view</a> per <code>Document</code>: the browser's window
+  (screen media). This is typically the <a href=#default-view>default view</a>. If
+  a page is printed, however, a second view becomes evident, that of
+  the print media. The two views always share the same underlying
+  <code>Document</code> object, but they have a different presentation
+  of that object. A speech browser might have a different
+  <a href=#default-view>default view</a>, using the speech media.</p>
 
   <p class=note>A <code>Document</code> does not necessarily have a
   <a href=#browsing-context>browsing context</a> associated with it. In particular,
   data mining tools are likely to never instantiate browsing
   contexts.</p>
 
-  <p>A <a href=#browsing-context>browsing context</a> can have a <dfn id=creator-browsing-context>creator browsing
+  <hr><p>A <a href=#browsing-context>browsing context</a> can have a <dfn id=creator-browsing-context>creator browsing
   context</dfn>, the <a href=#browsing-context>browsing context</a> that was
   responsible for its creation. Unless otherwise specified, a
   <a href=#browsing-context>browsing context</a> has no <a href=#creator-browsing-context>creator browsing
@@ -33235,13 +33247,6 @@
   that <a href=#creator-browsing-context>creator browsing context</a> at the time <var title="">A</var> was created is the <dfn id=creator-document>creator
   <code>Document</code></dfn>.</p>
 
-  <p>The main <a href=#view>view</a> through which a user primarily
-  interacts with a user agent is the <dfn id=default-view>default view</dfn>.</p>
-
-  <p class=note>The <a href=#default-view>default view</a> of a
-  <code>Document</code> is given by the <code title="">defaultView</code> attribute on the <code>Document</code>
-  object's <code>DocumentView</code> interface. <a href=#refsDOM3VIEWS>[DOM3VIEWS]</a></p>
-
   <p>When a <a href=#browsing-context>browsing context</a> is first created, it must be
   created with a single <code>Document</code> in its session history,
   whose <a href="#the-document's-address" title="the document's address">address</a> is
@@ -33319,29 +33324,30 @@
   <h5 id=navigating-nested-browsing-contexts-in-the-dom><span class=secno>5.1.1.1 </span>Navigating nested browsing contexts in the DOM</h5>
 
   <p>The <dfn id=dom-top title=dom-top><code>top</code></dfn> DOM attribute on
-  the <code><a href=#window>Window</a></code> object of a <a href=#browsing-context>browsing context</a>
-  <var title="">b</var> must return the <code><a href=#window>Window</a></code> object of
-  its <a href=#top-level-browsing-context>top-level browsing context</a> (which would be its own
-  <code><a href=#window>Window</a></code> object if it was a <a href=#top-level-browsing-context>top-level browsing
-  context</a> itself).</p>
+  the <code><a href=#window>Window</a></code> object of a <code>Document</code> in a
+  <a href=#browsing-context>browsing context</a> <var title="">b</var> must return the
+  <code><a href=#windowproxy>WindowProxy</a></code> object of its <a href=#top-level-browsing-context>top-level browsing
+  context</a> (which would be its own <code><a href=#windowproxy>WindowProxy</a></code>
+  object if it was a <a href=#top-level-browsing-context>top-level browsing context</a>
+  itself).</p>
 
   <p>The <dfn id=dom-parent title=dom-parent><code>parent</code></dfn> DOM
-  attribute on the <code><a href=#window>Window</a></code> object of a <a href=#browsing-context>browsing
-  context</a> <var title="">b</var> must return the
-  <code><a href=#window>Window</a></code> object of the <a href=#parent-browsing-context>parent browsing
-  context</a>, if there is one (i.e. if <var title="">b</var> is a
-  <a href=#child-browsing-context>child browsing context</a>), or the <code><a href=#window>Window</a></code>
-  object of the <a href=#browsing-context>browsing context</a> <var title="">b</var>
-  itself, otherwise (i.e. if it is a <a href=#top-level-browsing-context>top-level browsing
-  context</a>).</p>
+  attribute on the <code><a href=#window>Window</a></code> object of a
+  <code>Document</code> in a <a href=#browsing-context>browsing context</a> <var title="">b</var> must return the <code><a href=#windowproxy>WindowProxy</a></code> object of
+  the <a href=#parent-browsing-context>parent browsing context</a>, if there is one (i.e. if
+  <var title="">b</var> is a <a href=#child-browsing-context>child browsing context</a>), or
+  the <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context>browsing
+  context</a> <var title="">b</var> itself, otherwise (i.e. if it
+  is a <a href=#top-level-browsing-context>top-level browsing context</a>).</p>
 
   <p>The <dfn id=dom-frameelement title=dom-frameElement><code>frameElement</code></dfn>
-  DOM attribute on the <code><a href=#window>Window</a></code> object of a <a href=#browsing-context>browsing
-  context</a> <var title="">b</var>, on getting, must run the
-  following algorithm:</p>
+  DOM attribute on the <code><a href=#window>Window</a></code> object of a
+  <code>Document</code> <var title="">d</var>, on getting, must run
+  the following algorithm:</p>
 
-  <ol><li><p>If <var title="">b</var> is not a <a href=#child-browsing-context>child browsing
-   context</a>, return null and abort these steps.</li>
+  <ol><li><p>If <var title="">d</var> is not a <code>Document</code> in a
+   <a href=#child-browsing-context>child browsing context</a>, return null and abort these
+   steps.</li>
 
    <li><p>If the <a href=#parent-browsing-context>parent browsing context</a>'s <a href=#active-document>active
    document</a> does not have the <span>same</span> <a href=#effective-script-origin>effective
@@ -33372,10 +33378,10 @@
 
   <p>The <dfn id=dom-opener title=dom-opener><code>opener</code></dfn> DOM
   attribute on the <code><a href=#window>Window</a></code> object must return the
-  <code><a href=#window>Window</a></code> object of the <a href=#browsing-context>browsing context</a> from
-  which the current browsing context was created (its <a href=#opener-browsing-context>opener
-  browsing context</a>), if there is one and it is still
-  available.</p>
+  <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context>browsing context</a>
+  from which the current <a href=#browsing-context>browsing context</a> was created
+  (its <a href=#opener-browsing-context>opener browsing context</a>), if there is one and it
+  is still available.</p>
 
 
 
@@ -33563,17 +33569,24 @@
 
    </li>
 
-  </ol><h3 id=the-default-view><span class=secno>5.2 </span>The default view</h3>
+  </ol><h3 id=the-windowproxy-object><span class=secno>5.2 </span>The <code><a href=#windowproxy>WindowProxy</a></code> object</h3>
 
-  <p>The <code>AbstractView</code> object of <a href=#default-view title="default
-  view">default views</a> must also implement the
-  <code><a href=#window>Window</a></code> and <code>EventTarget</code> interfaces.</p>
+  <p>As mentioned earlier, each <a href=#browsing-context>browsing context</a> has a
+  <dfn id=windowproxy>WindowProxy</dfn> object. This object is unusual in that it
+  must proxy all operations to the <code><a href=#window>Window</a></code> object of the
+  <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active document</a>. It is
+  thus indistinguishable from that <code><a href=#window>Window</a></code> object in every
+  way, except that it is not equal to it.</p>
 
+
+
+  <h3 id=the-window-object><span class=secno>5.3 </span>The <code><a href=#window>Window</a></code> object</h3>
+
   <pre class=idl>[<a href=#dom-window-item title=dom-window-item>IndexGetter</a>, <a href=#dom-window-nameditem title=dom-window-namedItem>NameGetter</a>=OverrideBuiltins]
 interface <dfn id=window>Window</dfn> {
   // the current browsing context
-  readonly attribute <a href=#window>Window</a> <a href=#dom-window title=dom-window>window</a>;
-  readonly attribute <a href=#window>Window</a> <a href=#dom-self title=dom-self>self</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-window title=dom-window>window</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-self title=dom-self>self</a>;
            attribute DOMString <a href=#dom-name title=dom-name>name</a>;
   [PutForwards=href] readonly attribute <a href=#location>Location</a> <a href=#dom-document-location title=dom-document-location>location</a>;
   readonly attribute <a href=#history-1>History</a> <a href=#dom-history title=dom-history>history</a>;
@@ -33591,13 +33604,13 @@
   void <a href=#dom-window-blur title=dom-window-blur>blur</a>();
 
   // other browsing contexts
-  readonly attribute <a href=#window>Window</a> <a href=#dom-frames title=dom-frames>frames</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-frames title=dom-frames>frames</a>;
   readonly attribute unsigned long <a href=#dom-length title=dom-length>length</a>;
-  readonly attribute <a href=#window>Window</a> <a href=#dom-top title=dom-top>top</a>;
-  [Replaceable] readonly attribute <a href=#window>Window</a> <a href=#dom-opener title=dom-opener>opener</a>;
-  readonly attribute <a href=#window>Window</a> <a href=#dom-parent title=dom-parent>parent</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-top title=dom-top>top</a>;
+  [Replaceable] readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-opener title=dom-opener>opener</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-parent title=dom-parent>parent</a>;
   readonly attribute <span>Element</span> <a href=#dom-frameelement title=dom-frameElement>frameElement</a>;
-  <a href=#window>Window</a> <a href=#dom-open title=dom-open>open</a>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
+  <a href=#windowproxy>WindowProxy</a> <a href=#dom-open title=dom-open>open</a>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
 
   // the user agent
   readonly attribute <a href=#navigator>Navigator</a> <a href=#dom-navigator title=dom-navigator>navigator</a>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
@@ -33664,30 +33677,24 @@
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindowInternal.idl - DOM level 0
    -->
 
+  <p>The <code><a href=#window>Window</a></code> object must also implement the
+  <code>EventTarget</code> interface.</p>
+
   <p>The <dfn id=dom-window title=dom-window><code>window</code></dfn>, <dfn id=dom-frames title=dom-frames><code>frames</code></dfn>, and <dfn id=dom-self title=dom-self><code>self</code></dfn> DOM attributes must all
-  return the <code><a href=#window>Window</a></code> object itself.</p>
+  return the <code><a href=#window>Window</a></code> object's <a href=#browsing-context>browsing
+  context</a>'s <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
 
-  <p>The <code><a href=#window>Window</a></code> object also provides the scope for <a href=#concept-script title=concept-script>script</a>
-  execution. Each <code>Document</code> in a <a href=#browsing-context>browsing
-  context</a> has an associated <dfn id=list-of-added-properties>list of added properties</dfn>
-  that, when a document is <a href=#active-document title="active
-  document">active</a>, are available on the
-  <code>Document</code>'s <a href=#default-view>default view</a>'s
-  <code><a href=#window>Window</a></code> object. A <code>Document</code> object's
-  <a href=#list-of-added-properties>list of added properties</a> must be empty when the
-  <code>Document</code> object is created.</p>
 
 
+  <h4 id=security-2><span class=secno>5.3.1 </span>Security</h4>
 
-  <h4 id=security-2><span class=secno>5.2.1 </span>Security</h4>
+  <p>User agents must raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception
+  whenever any of the members of a <code><a href=#window>Window</a></code> object are
+  accessed by scripts whose <a href=#effective-script-origin>effective script origin</a> is
+  not the same as the <code><a href=#window>Window</a></code> object's
+  <code>Document</code>'s <a href=#effective-script-origin>effective script origin</a>, with
+  the following exceptions:</p>
 
-  <p>User agents must raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception whenever
-  any of the members of a <code><a href=#window>Window</a></code> object are accessed by
-  scripts whose <a href=#effective-script-origin>effective script origin</a> is not the same
-  as the <code><a href=#window>Window</a></code> object's <a href=#browsing-context>browsing context</a>'s
-  <a href=#active-document>active document</a>'s <a href=#effective-script-origin>effective script origin</a>,
-  with the following exceptions:</p>
-
   <ul><li>The <code title=dom-location><a href=#dom-location>location</a></code> object
 
    <li>The <code title=dom-window-postMessage-2><a href=#dom-window-postmessage-2>postMessage()</a></code>
@@ -33705,7 +33712,7 @@
 
 
 
-  <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.2.2 </span>APIs for creating and navigating browsing contexts by name</h4>
+  <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=secno>5.3.2 </span>APIs for creating and navigating browsing contexts by name</h4>
 
   <p>The <dfn id=dom-open title=dom-open><code>open()</code></dfn> method on
   <code><a href=#window>Window</a></code> objects provides a mechanism for <a href=#navigate title=navigate>navigating</a> an existing <a href=#browsing-context>browsing
@@ -33770,11 +33777,11 @@
   <a href=#concept-script title=concept-script>script</a> that invoked the method
   as the <a href=#source-browsing-context>source browsing context</a>.</p>
 
-  <p>The method must return the <code><a href=#window>Window</a></code> object of the
-  default view of the <a href=#browsing-context>browsing context</a> that was
-  navigated, or null if no browsing context was navigated.</p>
+  <p>The method must return the <code><a href=#windowproxy>WindowProxy</a></code> object of the
+  <a href=#browsing-context>browsing context</a> that was navigated, or null if no
+  browsing context was navigated.</p>
 
-  <p>The <dfn id=dom-name title=dom-name><code>name</code></dfn> attribute of
+  <hr><p>The <dfn id=dom-name title=dom-name><code>name</code></dfn> attribute of
   the <code><a href=#window>Window</a></code> object must, on getting, return the current
   name of the <a href=#browsing-context>browsing context</a>, and, on setting, set the
   name of the <a href=#browsing-context>browsing context</a> to the new value.</p>
@@ -33782,7 +33789,7 @@
   <p class=note>The name <a href=#resetBCName>gets reset</a> when
   the browsing context is navigated to another domain.</p>
 
-  <p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn>
+  <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> objects should, if the corresponding
   <a href=#browsing-context>browsing context</a> <var title="">A</var> is an
   <a href=#auxiliary-browsing-context>auxiliary browsing context</a> that was created by a script
@@ -33795,39 +33802,42 @@
 
 
 
-  <h4 id=accessing-other-browsing-contexts><span class=secno>5.2.3 </span>Accessing other browsing contexts</h4>
+  <h4 id=accessing-other-browsing-contexts><span class=secno>5.3.3 </span>Accessing other browsing contexts</h4>
 
   <p>The <dfn id=dom-length title=dom-length><code>length</code></dfn> DOM
   attribute on the <code><a href=#window>Window</a></code> interface must return the
   number of <a href=#child-browsing-context title="child browsing context">child browsing
-  contexts</a> of the <a href=#active-document title="active document">active</a>
-  <code>Document</code>.</p>
+  contexts</a> of the <code>Document</code>.</p>
 
   <p>The <span>indices of the supported indexed properties</span> on
   the <code><a href=#window>Window</a></code> object at any instant are the numbers in the
   range 0 .. <span><var title="">n</var>-1</span>, where <var title="">n</var> is the number of <a href=#child-browsing-context title="child browsing
-  context">child browsing contexts</a> of the <a href=#active-document title="active
-  document">active</a> <code>Document</code>. If <var title="">n</var> is zero then there are no <span>supported indexed
-  properties</span>.</p>
+  context">child browsing contexts</a> of the
+  <code>Document</code>. If <var title="">n</var> is zero then there
+  are no <span>supported indexed properties</span>.</p>
 
   <p>When a <code><a href=#window>Window</a></code> object is <dfn id=dom-window-item title=dom-window-item>indexed to retrieve an indexed
   property</dfn> <var title="">index</var>, the value returned must be
   the <var title="">index</var>th <a href=#child-browsing-context>child browsing context</a>
-  of the <a href=#active-document title="active document">active</a>
-  <code>Document</code>, sorted in document order of the elements
-  nesting those browsing contexts.</p>
+  of the <code>Document</code>, sorted in the <a href=#tree-order>tree order</a>
+  of the elements nesting those <a href=#browsing-context title="browsing
+  context">browsing contexts</a>.</p>
 
   <p>These properties are the <dfn id=dynamic-nested-browsing-context-properties>dynamic nested browsing context
   properties</dfn>.</p>
 
 
-  <h4 id=garbage-collection-and-browsing-contexts><span class=secno>5.2.4 </span>Garbage collection and browsing contexts</h4>
+  <h4 id=garbage-collection-and-browsing-contexts><span class=secno>5.3.4 </span>Garbage collection and browsing contexts</h4>
 
   <p>A <a href=#browsing-context>browsing context</a> has a strong reference to each of
-  its <code>Document</code>s and <a href=#view title=view>views</a>, and
-  the user agent itself has a strong reference to its <a href=#top-level-browsing-context title="top-level browsing context">top-level browsing
+  its <code>Document</code>s and its <code>WindowProxt</code> object,
+  and the user agent itself has a strong reference to its <a href=#top-level-browsing-context title="top-level browsing context">top-level browsing
   contexts</a>.</p>
 
+  <p>A <code>Document</code> has a strong reference to each of its
+  <a href=#view title=view>views</a> and their <code>AbstractView</code>
+  objects.</p>
+
   <p>When a <a href=#browsing-context>browsing context</a> is to <dfn id=discard-a-document>discard a
   <code>Document</code></dfn>, that means that it is to lose the
   strong reference from the <code>Document</code>'s <a href=#browsing-context>browsing
@@ -33835,9 +33845,8 @@
 
   <p class=note>The <a href=#browsing-context>browsing context</a>'s <a href=#default-view>default
   view</a>'s <code><a href=#window>Window</a></code> object <a href=#implied-strong-reference title="implied strong
-  reference">has a strong reference of its own</a> to the
-  <code>Document</code> object of the <a href=#browsing-context>browsing context</a>'s
-  <a href=#active-document>active document</a>.</p>
+  reference">has a strong reference of its own</a> to its
+  <code>Document</code> object.</p>
 
   <p>When <dfn id=a-browsing-context-is-discarded>a <em><span>browsing context</span></em> is
   discarded</dfn>, the strong reference from the user agent itself to
@@ -33851,12 +33860,12 @@
   in response to user requests, e.g. when a user closes a window
   containing one or more <a href=#top-level-browsing-context title="top-level browsing
   context">top-level browsing contexts</a>). Other <a href=#browsing-context title="browsing context">browsing contexts</a> must be discarded
-  once their <code><a href=#window>Window</a></code> object is eligible for garbage
+  once their <code><a href=#windowproxy>WindowProxy</a></code> object is eligible for garbage
   collection.</p>
 
 
 
-  <h4 id=named-access-on-the-window-object><span class=secno>5.2.5 </span>Named access on the <code><a href=#window>Window</a></code> object</h4>
+  <h4 id=named-access-on-the-window-object><span class=secno>5.3.5 </span>Named access on the <code><a href=#window>Window</a></code> object</h4>
 
   <p>The <code><a href=#window>Window</a></code> interface <span title="support named
   properties">supports named properties</span>. The <span>names of the
@@ -33891,10 +33900,10 @@
    <li>
 
     <p>If <var title="">elements</var> contains an <code><a href=#the-iframe-element>iframe</a></code>
-    element, then return the <code><a href=#window>Window</a></code> object of the
-    <a href=#default-view>default view</a> of the <a href=#nested-browsing-context>nested browsing
-    context</a> represented by the first such <code><a href=#the-iframe-element>iframe</a></code>
-    element in <a href=#tree-order>tree order</a>, and abort these steps.</p>
+    element, then return the <code><a href=#windowproxy>WindowProxy</a></code> object of the
+    <a href=#nested-browsing-context>nested browsing context</a> represented by the first such
+    <code><a href=#the-iframe-element>iframe</a></code> element in <a href=#tree-order>tree order</a>, and abort
+    these steps.</p>
 
    </li>
 
@@ -33925,7 +33934,7 @@
 
    <li><a href=#html-elements>HTML elements</a> elements that have an <code title=attr-id><a href=#the-id-attribute>id</a></code> content attribute whose value is <var title="">name</var>.</li>
 
-  </ul><h4 id=browser-interface-elements><span class=secno>5.2.6 </span>Browser interface elements</h4>
+  </ul><h4 id=browser-interface-elements><span class=secno>5.3.6 </span>Browser interface elements</h4>
 
   <p>To allow Web pages to integrate with Web browsers, certain Web
   browser interface elements are exposed in a limited way to scripts
@@ -34023,7 +34032,7 @@
 -->
 
 
-  <h3 id=origin><span class=secno>5.3 </span>Origin</h3>
+  <h3 id=origin><span class=secno>5.4 </span>Origin</h3>
   <!-- Hallowed are the Ori -->
 
   <p>The <dfn id=origin-0>origin</dfn> of a resource and the <dfn id=effective-script-origin>effective script
@@ -34195,8 +34204,7 @@
      <dd>The <a href=#origin-0>origin</a> and <a href=#effective-script-origin>effective script
      origin</a> are equal to the <a href=#origin-0>origin</a> and
      <a href=#effective-script-origin>effective script origin</a> of the <code>Document</code>
-     object that was the <a href=#active-document>active document</a> of the browsing context of the
-     <code><a href=#window>Window</a></code> object from which the
+     object of the <code><a href=#window>Window</a></code> object from which the
      <code>XMLHttpRequest</code> constructor was invoked. (That is,
      they track the <code>Document</code> to which the
      <code>XMLHttpRequest</code> object's <a href=http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#document-pointer><code>Document</code>
@@ -34349,7 +34357,7 @@
 
    <li><p>Return true.</li>
 
-  </ol><h4 id=relaxing-the-same-origin-restriction><span class=secno>5.3.1 </span>Relaxing the same-origin restriction</h4>
+  </ol><h4 id=relaxing-the-same-origin-restriction><span class=secno>5.4.1 </span>Relaxing the same-origin restriction</h4>
 
   <p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn>
   attribute on <code>Document</code> objects must be initialized to
@@ -34456,9 +34464,9 @@
 
 
 
-  <h3 id=scripting><span class=secno>5.4 </span>Scripting</h3>
+  <h3 id=scripting><span class=secno>5.5 </span>Scripting</h3>
 
-  <h4 id=introduction-0><span class=secno>5.4.1 </span>Introduction</h4>
+  <h4 id=introduction-0><span class=secno>5.5.1 </span>Introduction</h4>
 
   <p>Various mechanisms can cause author-provided executable code to
   run in the context of a document. These mechanisms include, but are
@@ -34478,7 +34486,7 @@
    <li>Processing of technologies like XBL or SVG that have their own
    scripting features.</li>
 
-  </ul><h4 id=enabling-and-disabling-scripting><span class=secno>5.4.2 </span>Enabling and disabling scripting</h4>
+  </ul><h4 id=enabling-and-disabling-scripting><span class=secno>5.5.2 </span>Enabling and disabling scripting</h4>
 
   <p><dfn id=concept-bc-script title=concept-bc-script>Scripting is enabled</dfn> in a
   <em><a href=#browsing-context>browsing context</a></em> when all of the
@@ -34512,9 +34520,9 @@
 
 
   <!-- SCRIPT EXEC (marks areas related to creation of scripts) -->
-  <h4 id=processing-model-1><span class=secno>5.4.3 </span>Processing model</h4>
+  <h4 id=processing-model-1><span class=secno>5.5.3 </span>Processing model</h4>
 
-  <h5 id=definitions-0><span class=secno>5.4.3.1 </span>Definitions</h5>
+  <h5 id=definitions-0><span class=secno>5.5.3.1 </span>Definitions</h5>
 
   <p>A <dfn id=concept-script title=concept-script>script</dfn> has:</p>
 
@@ -34610,74 +34618,36 @@
 
    </dd>
 
-   <dt>Membership in a <dfn id=script-group>script group</dfn></dt>
+  </dl><h5 id=calling-scripts><span class=secno>5.5.3.2 </span>Calling scripts</h5>
 
-   <dd>
-
-    <p>A group of one or more scripts that are loaded in the same
-    context, which are always disabled as a group. Scripts in a script
-    group all have the same <a href="#script's-global-object" title="script's global
-    object">global object</a> and <a href="#script's-browsing-context" title="script's browsing
-    context">browsing context</a>.</p>
-
-    <p>A script group can be <i>frozen</i>. When a script group is
-    frozen, any code defined in that script group will throw an
-    exception when invoked. A frozen script group can be
-    <i>unfrozen</i>, allowing scripts in that script group to run
-    normally again.</p>
-
-   </dd>
-
-  </dl><h5 id=calling-scripts><span class=secno>5.4.3.2 </span>Calling scripts</h5>
-
   <p>When a user agent is to <dfn id=jump-to-a-code-entry-point>jump to a code entry-point</dfn> for
-  a <a href=#concept-script title=concept-script>script</a>, for example because
-  one <a href=#concept-script title=concept-script>script</a> has called another,
-  or because the user agent is to invoke a callback defined in that
-  <a href=#concept-script title=concept-script>script</a>, the user agent must run
-  the following steps:</p>
+  a <a href=#concept-script title=concept-script>script</a>, for example to invoke
+  an event listener defined in that <a href=#concept-script title=concept-script>script</a>, the user agent must run the
+  following steps:</p>
 
-  <ol><li>
+  <ol><li><p>If the <a href="#script's-global-object">script's global object</a> is a
+   <code><a href=#window>Window</a></code> object whose <code>Document</code> object is
+   not <a href=#fully-active>fully active</a>, then abort these steps without doing
+   anything. The callback is not fired.</p>
 
-    <p>If executable code from a <a href=#concept-script title=concept-script>script</a> is making a call to a <a href=#concept-script title=concept-script>script</a> in the same <a href=#script-group>script
-    group</a>, then skip this step.</p>
+   <li><p>Set the <a href=#first-script>first script</a> to be the <a href=#concept-script title=concept-script>script</a> being invoked.</li>
 
-    <p>Otherwise, if <a href=#concept-bc-noscript title=concept-bc-noscript>scripting is
-    disabled</a> in the <a href="#script's-browsing-context">script's browsing context</a>, or
-    if the script's <a href=#script-group>script group</a> is <i>frozen</i>, then
-    the user agent must throw an <code><a href=#unavailable_script_err>UNAVAILABLE_SCRIPT_ERR</a></code>
-    exception and abort these steps.</p>
-
-   </li>
-
-   <li><p>If this algorithm was <em>not</em> invoked by one script
-   calling another, then set the <a href=#first-script>first script</a> to be the
-   <a href=#concept-script title=concept-script>script</a> being invoked.</li>
-
    <li><p>Make the <a href=#script-execution-environment title="script execution environment">script
    execution environment</a> for the <a href=#concept-script title=concept-script>script</a> execute the code for the given
    code entry-point.</li>
 
-   <li><p>If this algorithm was <em>not</em> invoked by one script
-   calling another, then set the <a href=#first-script>first script</a> back to
-   whatever it was when this algorithm started.</li>
+   <li><p>Set the <a href=#first-script>first script</a> back to whatever it was
+   when this algorithm started.</li>
 
-  </ol><p class=note>In particular, this means that scripts in a
-  <i>frozen</i> <a href=#script-group>script group</a> can keep on executing so
-  long as they don't call code in another <a href=#script-group>script
-  group</a>. This is why a script doesn't immediately terminate
-  after calling <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code>
-  on its own <code>Document</code>.</p>
+  </ol><p>This algorithm is not invoked by one script calling another.</p>
 
 
+  <h5 id=creating-scripts><span class=secno>5.5.3.3 </span>Creating scripts</h5>
 
-  <h5 id=creating-scripts><span class=secno>5.4.3.3 </span>Creating scripts</h5>
-
   <p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script title="create a
   script">created</dfn>, given some script source, its scripting
   language, a global object, a browsing context, a character encoding,
-  a base URL, and a script group, the user agent must run the
-  following steps:</p>
+  and a base URL, the user agent must run the following steps:</p>
 
   <ol><li><p>Set up a <a href=#script-execution-environment>script execution environment</a> as
    appropriate for the scripting language.</li>
@@ -34695,9 +34665,6 @@
    character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
    from the settings passed to this algorithm.</li>
 
-   <li><p>Add the <a href=#concept-script title=concept-script>script</a> to the given <a href=#script-group>script
-   group</a>.</li>
-
    <li><p><a href=#jump-to-a-code-entry-point title="jump to a code entry-point">Jump</a> to the
    <a href=#concept-script title=concept-script>script</a>'s <i><a href=#initial-code-entry-point>initial code
    entry-point</a></i>.</li>
@@ -34706,10 +34673,10 @@
   given some script source, its scripting language, and a browsing
   context, the user agent must <a href=#create-a-script>create a script</a>, using the
   given script source and scripting language, using a new empty object
-  as the global object, using the given browsing context as the
-  browsing context, and using a new script group as the script
-  group. The character encoding and base URL for the resulting <a href=#concept-script title=concept-script>script</a> are not important as no APIs
-  are exposed to the script.</p>
+  as the global object, and using the given browsing context as the
+  browsing context. The character encoding and base URL for the
+  resulting <a href=#concept-script title=concept-script>script</a> are not
+  important as no APIs are exposed to the script.</p>
 
   <hr><p>When the specification says that a <a href=#concept-script title=concept-script>script</a> is to be <dfn id=create-a-script-from-a-node title="create a
   script from a node">created from a node</dfn> <var title="">node</var>, given some script source and its scripting
@@ -34726,8 +34693,7 @@
    <li><p>The browsing context is the <a href=#browsing-context>browsing context</a> of
    <var title="">document</var>.</p>
 
-   <li><p>The global object is the <code><a href=#window>Window</a></code> object of the
-   <a href=#default-view>default view</a> of the <a href=#browsing-context>browsing context</a> of
+   <li><p>The global object is the <code><a href=#window>Window</a></code> object of
    <var title="">document</var>.</li>
 
    <li><p>The character encoding is the <a href="#document's-character-encoding" title="document's
@@ -34737,11 +34703,8 @@
    <li><p>The base URL is the <a href=#document-base-url title="document base URL">base
    URL</a> of <var title="">document</var>. (<a href=#sbu-not-copy>This is a reference, not a copy</a>.)</li>
 
-   <li><p>The script group is the <a href=#current-script-group>current script group</a> of
-   <var title="">document</var>.</li>
+  </ol><h5 id=killing-scripts><span class=secno>5.5.3.4 </span>Killing scripts</h5>
 
-  </ol><h5 id=killing-scripts><span class=secno>5.4.3.4 </span>Killing scripts</h5>
-
   <p>User agents may impose resource limitations on scripts, for
   example CPU quotas, memory limits, total execution time limits, or
   bandwidth limitations. When a script exceeds a limit, the user agent
@@ -34770,7 +34733,7 @@
   should be terminated immediately.</p>
 
 
-  <h4 id=event-loops><span class=secno>5.4.4 </span>Event loops</h4>
+  <h4 id=event-loops><span class=secno>5.5.4 </span>Event loops</h4>
 
   <p>To coordinate events, user interaction, scripts, rendering,
   networking, and so forth, user agents must use <dfn id=event-loop title="event
@@ -34879,7 +34842,7 @@
    <li><p>Return to the first step of the <a href=#event-loop>event
    loop</a>.</li>
 
-  </ol><h5 id=generic-task-sources><span class=secno>5.4.4.1 </span>Generic task sources</h5>
+  </ol><h5 id=generic-task-sources><span class=secno>5.5.4.1 </span>Generic task sources</h5>
 
   <p>The following <a href=#task-source title="task source">task sources</a> are
   used by a number of mostly unrelated features in this and other
@@ -34925,7 +34888,7 @@
 
    </dd>
 
-  </dl><!-- SCRIPT EXEC --><h4 id=javascript-protocol><span class=secno>5.4.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> protocol</dfn></h4>
+  </dl><!-- SCRIPT EXEC --><h4 id=javascript-protocol><span class=secno>5.5.5 </span><dfn title="javascript protocol">The <code title="">javascript:</code> protocol</dfn></h4>
 
   <p>When a <a href=#url>URL</a> using the <code title="">javascript:</code> protocol is <dfn id=concept-js-deref title=concept-js-deref>dereferenced</dfn>, the user agent must run
   the following steps:</p>
@@ -35049,10 +35012,10 @@
   has disabled scripting altogether.</p>
 
 
-  <h4 id=events><span class=secno>5.4.6 </span>Events</h4>
+  <h4 id=events><span class=secno>5.5.6 </span>Events</h4>
 
 
-  <h5 id=event-handler-attributes><span class=secno>5.4.6.1 </span>Event handler attributes</h5>
+  <h5 id=event-handler-attributes><span class=secno>5.5.6.1 </span>Event handler attributes</h5>
 
   <!--test: <a href="http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aw(a%3Ddocument.implementation.createDocument(null%2C%20null%2C%20null))%3B%0Aw(a.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'html')))%3B%0Aw(b%3Da.firstChild.appendChild(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'body')))%3B%0Aw(b.test%20%3D%20w)%3B%0Aw(b.setAttribute('onclick'%2C%20'test(%22fire%3A%20%22%20%2B%20event)'))%3B%0Aw(b.onclick)%3B%0Aw(e%3Da.createEvent('Event'))%3B%0Aw(e.initEvent('click'%2C%20false%2C%20false))%3B%0Aw(b.dispatchEvent(e))%3B%0A%3C%2Fscript%3E">test</a>-->
 
@@ -35122,8 +35085,7 @@
     of the handler, to the element's object, to the element's
     <a href=#form-owner>form owner</a>, if it has one, to the element's
     <code>Document</code> object, to the <code><a href=#window>Window</a></code> object of
-    the <a href=#browsing-context>browsing context</a> of that
-    <code>Document</code>. Set the function's <code>this</code>
+    that <code>Document</code>. Set the function's <code>this</code>
     parameter to the <code>Element</code> object representing the
     element. Let this function be the only entry in the script's
     <a href=#list-of-code-entry-points>list of code entry-points</a>.</p>
@@ -35141,8 +35103,7 @@
    <a href="#script's-browsing-context">script's browsing context</a>, the <a href="#script's-character-encoding">script's
    character encoding</a>, and the <a href="#script's-base-url">script's base URL</a>
    from <a href=#the-script-settings-determined-from-the-node>the script settings determined from the node</a> on
-   which the attribute is being set, and add the <a href=#concept-script title=concept-script>script</a> to the <a href=#script-group>script
-   group</a> determined from that node as well.</li>
+   which the attribute is being set.</li>
 
    <li><p>Set the corresponding event handler attribute to the
    aforementioned function.</li>
@@ -35222,7 +35183,7 @@
 
 
 
-  <h5 id=event-handler-attributes-on-elements-and-on-window-objects><span class=secno>5.4.6.2 </span>Event handler attributes on elements and on <code><a href=#window>Window</a></code> objects</h5>
+  <h5 id=event-handler-attributes-on-elements-and-on-window-objects><span class=secno>5.5.6.2 </span>Event handler attributes on elements and on <code><a href=#window>Window</a></code> objects</h5>
 
   <p>The following are the event handler attributes that must be
   supported by all <a href=#html-elements>HTML elements</a>, as both content
@@ -35483,7 +35444,7 @@
    <dd><p>Must be invoked whenever an <code title=event-unload>unload</code> event is targeted at or bubbles
    through the object.</dd>
 
-  </dl><h5 id=event-firing><span class=secno>5.4.6.3 </span>Event firing</h5>
+  </dl><h5 id=event-firing><span class=secno>5.5.6.3 </span>Event firing</h5>
 
   <p class=XXX>maybe this should be moved higher up
   (terminology? conformance? DOM?) Also, the whole terminology thing
@@ -35553,7 +35514,7 @@
   dispatched in expected ways.</p>
 
 
-  <h5 id=events-and-the-window-object><span class=secno>5.4.6.4 </span>Events and the <code><a href=#window>Window</a></code> object</h5>
+  <h5 id=events-and-the-window-object><span class=secno>5.5.6.4 </span>Events and the <code><a href=#window>Window</a></code> object</h5>
 
   <p>When an event is dispatched at a DOM node in a
   <code>Document</code> in a <a href=#browsing-context>browsing context</a>, if the
@@ -35569,7 +35530,7 @@
    <code><a href=#window>Window</a></code> object at the end of the phase, unless bubbling
    has been prevented.</li>
 
-  </ol><h5 id=runtime-script-errors><span class=secno>5.4.6.5 </span>Runtime script errors</h5>
+  </ol><h5 id=runtime-script-errors><span class=secno>5.5.6.5 </span>Runtime script errors</h5>
 
   <p><em>This section only applies to user agents that support
   scripting in general and ECMAScript in particular.</em></p>
@@ -35625,9 +35586,9 @@
 
    </dd>
 
-  </dl><h3 id=user-prompts><span class=secno>5.5 </span>User prompts</h3>
+  </dl><h3 id=user-prompts><span class=secno>5.6 </span>User prompts</h3>
 
-  <h4 id=simple-dialogs><span class=secno>5.5.1 </span>Simple dialogs</h4>
+  <h4 id=simple-dialogs><span class=secno>5.6.1 </span>Simple dialogs</h4>
 
   <p>The <dfn id=dom-alert title=dom-alert><code>alert(<var title="">message</var>)</code></dfn> method, when invoked, must show
   the given <var title="">message</var> to the user. The user agent
@@ -35654,7 +35615,7 @@
   must return the string that the user responded with.</p>
 
 
-  <h4 id=printing><span class=secno>5.5.2 </span>Printing</h4>
+  <h4 id=printing><span class=secno>5.6.2 </span>Printing</h4>
 
   <p>The <dfn id=dom-print title=dom-print><code>print()</code></dfn> method,
   when invoked, must run the <a href=#printing-steps>printing steps</a>.</p>
@@ -35685,9 +35646,9 @@
 
     <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
     <code title=event-beforeprint>beforeprint</code> at the
-    <code><a href=#window>Window</a></code> object of the browsing context of the
-    <code>Document</code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing context">nested browsing contexts</a> in
-    it.</p>
+    <code><a href=#window>Window</a></code> object of the <code>Document</code> that is
+    being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+    context">nested browsing contexts</a> in it.</p>
 
     <p class=example>The <code title=event-beforeprint>beforeprint</code> event can be used
     to annotate the printed copy, for instance adding the time at
@@ -35713,9 +35674,9 @@
 
     <p>The user agent must <a href=#fire-a-simple-event>fire a simple event</a> called
     <code title=event-afterprint>afterprint</code> at the
-    <code><a href=#window>Window</a></code> object of the browsing context of the
-    <code>Document</code> that is being printed, as well as any <a href=#nested-browsing-context title="nested browsing context">nested browsing contexts</a> in
-    it.</p>
+    <code><a href=#window>Window</a></code> object of the <code>Document</code> that is
+    being printed, as well as any <a href=#nested-browsing-context title="nested browsing
+    context">nested browsing contexts</a> in it.</p>
 
     <p class=example>The <code title=event-afterprint>afterprint</code> event can be used
     to revert annotations added in the earlier event, as well as
@@ -35726,7 +35687,7 @@
 
    </li>
 
-  </ol><h4 id=dialogs-implemented-using-separate-documents><span class=secno>5.5.3 </span>Dialogs implemented using separate documents</h4>
+  </ol><h4 id=dialogs-implemented-using-separate-documents><span class=secno>5.6.3 </span>Dialogs implemented using separate documents</h4>
 
   <p>The <dfn id=dom-showmodaldialog title=dom-showModalDialog><code>showModalDialog(<var title="">url</var>, <var title="">argument</var><!--, <var
   title="">features</var>-->)</code></dfn> method, when invoked, must
@@ -35798,8 +35759,9 @@
     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. The new auxiliary browsing context has no name.</p>
 
-    <p class=note>This browsing context implements the
-    <code><a href=#windowmodal>WindowModal</a></code> interface.</p>
+    <p class=note>This <a href=#browsing-context>browsing context</a>'s
+    <code>Document</code>s' <code><a href=#window>Window</a></code> objects all implement
+    the <code><a href=#windowmodal>WindowModal</a></code> interface.</p>
 
    </li>
 
@@ -35850,8 +35812,10 @@
 
    </li>
 
-  </ol><p>Browsing contexts created by the above algorithm must implement
-  the <code><a href=#windowmodal>WindowModal</a></code> interface:</p>
+  </ol><p>The <code><a href=#window>Window</a></code> objects of <code>Document</code>s hosted
+  by <a href=#browsing-context title="browsing context">browsing contexts</a> created
+  by the above algorithm must all implement the
+  <code><a href=#windowmodal>WindowModal</a></code> interface:</p>
 
   <p class=XXX>Really I want the Window object to just gain these
   attributes, as if they were on the Window prototype. That's the XXX
@@ -36090,7 +36054,7 @@
 -->
 
 
-  <h3 id=system-state-and-capabilities><span class=secno>5.6 </span>System state and capabilities</h3>
+  <h3 id=system-state-and-capabilities><span class=secno>5.7 </span>System state and capabilities</h3>
 
   <p>The <dfn id=dom-navigator title=dom-navigator><code>navigator</code></dfn>
   attribute of the <code><a href=#window>Window</a></code> interface must return an
@@ -36143,7 +36107,7 @@
    -->
 
 
-  <h4 id=client-identification><span class=secno>5.6.1 </span>Client identification</h4>
+  <h4 id=client-identification><span class=secno>5.7.1 </span>Client identification</h4>
 
   <p>In certain cases, despite the best efforts of the entire
   industry, Web browsers have bugs and limitations that Web authors
@@ -36188,7 +36152,7 @@
 
    <!-- vendorSub: Mozilla and Safari only; always returns "" -->
 
-  </dl><h4 id=custom-handlers><span class=secno>5.6.2 </span>Custom protocol and content handlers</h4>
+  </dl><h4 id=custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</h4>
 
   <p>The <dfn id=dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler><code>registerProtocolHandler()</code></dfn>
   method allows Web sites to register themselves as possible handlers
@@ -36344,7 +36308,7 @@
   not be able to fetch the same data.</p>
 
 
-  <h5 id=security-and-privacy><span class=secno>5.6.2.1 </span>Security and privacy</h5>
+  <h5 id=security-and-privacy><span class=secno>5.7.2.1 </span>Security and privacy</h5>
 
   <p>These mechanisms can introduce a number of concerns, in
   particular privacy concerns.</p>
@@ -36424,7 +36388,7 @@
   decision many users are unable to make or even understand).</p>
 
 
-  <h5 id=sample-handler-impl><span class=secno>5.6.2.2 </span>Sample user interface</h5>
+  <h5 id=sample-handler-impl><span class=secno>5.7.2.2 </span>Sample user interface</h5>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -36504,16 +36468,16 @@
 
 
 
-  <h3 id=offline><span class=secno>5.7 </span>Offline Web applications</h3>
+  <h3 id=offline><span class=secno>5.8 </span>Offline Web applications</h3>
 
-  <h4 id=introduction-1><span class=secno>5.7.1 </span>Introduction</h4>
+  <h4 id=introduction-1><span class=secno>5.8.1 </span>Introduction</h4>
 
   <p><em>This section is non-normative.</em></p>
 
   <p class=XXX>...</p>
 
 
-  <h4 id=appcache><span class=secno>5.7.2 </span>Application caches</h4>
+  <h4 id=appcache><span class=secno>5.8.2 </span>Application caches</h4>
 
   <p>An <dfn id=application-cache>application cache</dfn> is a set of cached resources
   consisting of:</p>
@@ -36625,10 +36589,10 @@
 
    <li>which application cache the user prefers.
 
-  </ul><h4 id=manifests><span class=secno>5.7.3 </span>The cache manifest syntax</h4>
+  </ul><h4 id=manifests><span class=secno>5.8.3 </span>The cache manifest syntax</h4>
 
 
-  <h5 id=a-sample-manifest><span class=secno>5.7.3.1 </span>A sample manifest</h5>
+  <h5 id=a-sample-manifest><span class=secno>5.8.3.1 </span>A sample manifest</h5>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -36664,7 +36628,7 @@
 style/default.css</pre>
 
 
-  <h5 id=writing-cache-manifests><span class=secno>5.7.3.2 </span>Writing cache manifests</h5>
+  <h5 id=writing-cache-manifests><span class=secno>5.8.3.2 </span>Writing cache manifests</h5>
 
   <p>Manifests must be served using the <code title="">text/cache-manifest</code> MIME type. All resources served
   using the <code title="">text/cache-manifest</code> MIME type must
@@ -36783,7 +36747,7 @@
   manifests).</p>
 
 
-  <h5 id=parsing-cache-manifests><span class=secno>5.7.3.3 </span>Parsing cache manifests</h5>
+  <h5 id=parsing-cache-manifests><span class=secno>5.8.3.3 </span>Parsing cache manifests</h5>
 
   <p>When a user agent is to <dfn id=parse-a-manifest>parse a manifest</dfn>, it means
   that the user agent must run the following steps:</p>
@@ -37022,7 +36986,7 @@
   will be ignored.</p>
 
 
-  <h4 id=updating-an-application-cache><span class=secno>5.7.4 </span>Updating an application cache</h4>
+  <h4 id=updating-an-application-cache><span class=secno>5.8.4 </span>Updating an application cache</h4>
 
   <p>When the user agent is required (by other parts of this
   specification) to start the <dfn id=application-cache-update-process>application cache update
@@ -37624,7 +37588,7 @@
 
 
 
-  <h4 id=matching-a-fallback-namespace><span class=secno>5.7.5 </span>Matching a fallback namespace</h4>
+  <h4 id=matching-a-fallback-namespace><span class=secno>5.8.5 </span>Matching a fallback namespace</h4>
 
   <p>A URL <dfn id=concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches a
   fallback namespace</dfn> if there exists a <a href=#relevant-application-cache>relevant
@@ -37652,7 +37616,7 @@
   </div>
 
 
-  <h4 id=the-application-cache-selection-algorithm><span class=secno>5.7.6 </span>The application cache selection algorithm</h4>
+  <h4 id=the-application-cache-selection-algorithm><span class=secno>5.8.6 </span>The application cache selection algorithm</h4>
 
   <p>When the <dfn id=concept-appcache-init title=concept-appcache-init>application cache
   selection algorithm</dfn> algorithm is invoked with a
@@ -37738,7 +37702,7 @@
 
    </dd>
 
-  </dl><h5 id=changesToNetworkingModel><span class=secno>5.7.6.1 </span>Changes to the networking model</h5>
+  </dl><h5 id=changesToNetworkingModel><span class=secno>5.8.6.1 </span>Changes to the networking model</h5>
 
   <p>When a <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active
   document</a> is associated with an <a href=#application-cache>application cache</a>
@@ -37794,7 +37758,7 @@
   simpler.</p>
 
 
-  <h4 id=application-cache-api><span class=secno>5.7.7 </span>Application cache API</h4>
+  <h4 id=application-cache-api><span class=secno>5.8.7 </span>Application cache API</h4>
 
   <pre class=idl>interface <dfn id=applicationcache>ApplicationCache</dfn> {
 
@@ -37826,12 +37790,11 @@
   <p>Objects implementing the <code><a href=#applicationcache>ApplicationCache</a></code> interface
   must also implement the <code>EventTarget</code> interface.</p>
 
-  <p>There is a one-to-one mapping from <code>Document</code> objects
-  to <code><a href=#applicationcache>ApplicationCache</a></code> objects. The <dfn id=dom-applicationcache title=dom-applicationCache><code>applicationCache</code></dfn>
+  <p>There is a one-to-one mapping from <code><a href=#window>Window</a></code> objects to
+  <code><a href=#applicationcache>ApplicationCache</a></code> objects. The <dfn id=dom-applicationcache title=dom-applicationCache><code>applicationCache</code></dfn>
   attribute on <code><a href=#window>Window</a></code> objects must return the
   <code><a href=#applicationcache>ApplicationCache</a></code> object associated with the
-  <a href=#active-document>active document</a> of the <code><a href=#window>Window</a></code>'s
-  <a href=#browsing-context>browsing context</a>.</p>
+  <code><a href=#window>Window</a></code> object.</p>
 
   <p>An <code><a href=#applicationcache>ApplicationCache</a></code> object might be associated with
   an <a href=#application-cache>application cache</a>. When the <code>Document</code>
@@ -37994,7 +37957,7 @@
    <dd><p>Must be invoked whenever an <code title=event-obsolete>obsolete</code> event is targeted at or bubbles
    through the <code><a href=#applicationcache>ApplicationCache</a></code> object.</dd>
 
-  </dl><h4 id=browser-state><span class=secno>5.7.8 </span>Browser state</h4>
+  </dl><h4 id=browser-state><span class=secno>5.8.8 </span>Browser state</h4>
 
   <p>The <dfn id=dom-navigator-online title=dom-navigator-onLine><code>navigator.onLine</code></dfn>
   attribute must return false if the user agent will not contact the
@@ -38018,27 +37981,28 @@
 
 
 
-  <h3 id=history><span class=secno>5.8 </span>Session history and navigation</h3>
+  <h3 id=history><span class=secno>5.9 </span>Session history and navigation</h3>
 
-  <h4 id=the-session-history-of-browsing-contexts><span class=secno>5.8.1 </span>The session history of browsing contexts</h4>
+  <h4 id=the-session-history-of-browsing-contexts><span class=secno>5.9.1 </span>The session history of browsing contexts</h4>
 
   <p>The sequence of <code>Document</code>s in a <a href=#browsing-context>browsing
   context</a> is its <dfn id=session-history>session history</dfn>.</p>
 
   <p><code><a href=#history-1>History</a></code> objects provide a representation of the
   pages in the session history of <a href=#browsing-context title="browsing
-  context">browsing contexts</a>. Each browsing context has a
-  distinct session history.</p>
+  context">browsing contexts</a>. Each <a href=#browsing-context>browsing
+  context</a>, including <a href=#nested-browsing-context>nested browsing context</a>, has
+  a distinct session history.</p>
 
-  <p>Each <code>Document</code> object in a browsing context's session
-  history is associated with a unique instance of the
-  <code><a href=#history-1>History</a></code> object, although they all must model the same
-  underlying session history.</p>
+  <p>Each <code>Document</code> object in a <a href=#browsing-context>browsing
+  context</a>'s <a href=#session-history>session history</a> is associated with a
+  unique instance of the <code><a href=#history-1>History</a></code> object, although they
+  all must model the same underlying <a href=#session-history>session history</a>.</p>
 
   <p>The <dfn id=dom-history title=dom-history><code>history</code></dfn> attribute
   of the <code><a href=#window>Window</a></code> interface must return the object
   implementing the <code><a href=#history-1>History</a></code> interface for that
-  <code><a href=#window>Window</a></code> object's <a href=#active-document>active document</a>.</p>
+  <code><a href=#window>Window</a></code> object's <code>Document</code>.</p>
 
   <p><code><a href=#history-1>History</a></code> objects represent their <a href=#browsing-context>browsing
   context</a>'s session history as a flat list of <a href=#session-history-entry title="session history entry">session history entries</a>. Each
@@ -38102,7 +38066,7 @@
   <code>Document</code> is evicted.</p>
 
 
-  <h4 id=the-history-interface><span class=secno>5.8.2 </span>The <code><a href=#history-1>History</a></code> interface</h4>
+  <h4 id=the-history-interface><span class=secno>5.9.2 </span>The <code><a href=#history-1>History</a></code> interface</h4>
 
   <pre class=idl>interface <dfn id=history-1>History</dfn> {
   readonly attribute long <a href=#dom-history-length title=dom-history-length>length</a>;
@@ -38229,7 +38193,7 @@
   history.</p>
 
 
-  <h4 id=activating-state-object-entries><span class=secno>5.8.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4>
+  <h4 id=activating-state-object-entries><span class=secno>5.9.3 </span><dfn title="activate the state object">Activating state object entries</dfn></h4>
 
   <p>When an entry in the session history is activated (which happens
   during <a href=#traverse-the-history title="traverse the history">session traversal</a>,
@@ -38249,13 +38213,13 @@
      string "complete"</dt>
 
      <dd><p><a href=#queue-a-task>Queue a task</a> to fire a <dfn id=event-popstate title=event-popstate><code>popstate</code></dfn> event in no
-     namespace on the <code><a href=#window>Window</a></code> object of the <a href=#browsing-context>browsing
-     context</a>, using the <code><a href=#popstateevent>PopStateEvent</a></code> interface,
-     with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code>
-     attribute set to the value of <var title="">state</var>. This
-     event must bubble but not be cancelable and has no default
-     action. The <a href=#task-source>task source</a> for this task is the
-     <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</dd>
+     namespace on the <code><a href=#window>Window</a></code> object of the
+     <code>Document</code>, using the <code><a href=#popstateevent>PopStateEvent</a></code>
+     interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
+     value of <var title="">state</var>. This event must bubble but
+     not be cancelable and has no default action. The <a href=#task-source>task
+     source</a> for this task is the <a href=#dom-manipulation-task-source>DOM manipulation task
+     source</a>.</dd>
 
      <dt>Otherwise</dt>
 
@@ -38288,7 +38252,7 @@
 
 
 
-  <h4 id=the-location-interface><span class=secno>5.8.4 </span>The <code><a href=#location>Location</a></code> interface</h4>
+  <h4 id=the-location-interface><span class=secno>5.9.4 </span>The <code><a href=#location>Location</a></code> interface</h4>
 
   <p>Each <code>Document</code> object in a <a href=#browsing-context>browsing
   context</a>'s session history is associated with a unique
@@ -38302,7 +38266,7 @@
   <p>The <dfn id=dom-location title=dom-location><code>location</code></dfn>
   attribute of the <code><a href=#window>Window</a></code> interface must return the
   <code><a href=#location>Location</a></code> object for that <code><a href=#window>Window</a></code> object's
-  <a href=#active-document>active document</a>.</p>
+  <code>Document</code>.</p>
 
   <p><code><a href=#location>Location</a></code> objects provide a representation of <a href="#the-document's-address" title="the document's address">their document's address</a>, and
   allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing
@@ -38405,7 +38369,7 @@
   <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception instead.</p>
 
 
-  <h5 id=security-3><span class=secno>5.8.4.1 </span>Security</h5>
+  <h5 id=security-3><span class=secno>5.9.4.1 </span>Security</h5>
 
   <p>User agents must raise a <code><a href=#security_err>SECURITY_ERR</a></code> exception whenever
   any of the members of a <code><a href=#location>Location</a></code> object are accessed by
@@ -38421,7 +38385,7 @@
   </ul><p>User agents must not allow scripts to override the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute's setter.</p>
 
 
-  <h4 id=history-notes><span class=secno>5.8.5 </span>Implementation notes for session history</h4>
+  <h4 id=history-notes><span class=secno>5.9.5 </span>Implementation notes for session history</h4>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -38459,9 +38423,9 @@
 
 
 
-  <h3 id=browsing-the-web><span class=secno>5.9 </span>Browsing the Web</h3>
+  <h3 id=browsing-the-web><span class=secno>5.10 </span>Browsing the Web</h3>
 
-  <h4 id=navigating-across-documents><span class=secno>5.9.1 </span>Navigating across documents</h4>
+  <h4 id=navigating-across-documents><span class=secno>5.10.1 </span>Navigating across documents</h4>
 
   <p>Certain actions cause the <a href=#browsing-context>browsing context</a> to
   <i><a href=#navigate>navigate</a></i> to a new resource. Navigation always involves
@@ -38794,7 +38758,7 @@
 
     </dl></li>
 
-  </ol><h4 id=read-html><span class=secno>5.9.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>
+  </ol><h4 id=read-html><span class=secno>5.10.2 </span><dfn title=navigate-html>Page load processing model for HTML files</dfn></h4>
 
   <p>When an HTML document is to be loaded in a <a href=#browsing-context>browsing
   context</a>, the user agent must create a <code>Document</code>
@@ -38828,7 +38792,7 @@
 
 
 
-  <h4 id=read-xml><span class=secno>5.9.3 </span><dfn title=navigate-xml>Page load processing model for XML files</dfn></h4>
+  <h4 id=read-xml><span class=secno>5.10.3 </span><dfn title=navigate-xml>Page load processing model for XML files</dfn></h4>
 
   <p>When faced with displaying an XML file inline, user agents must
   first create a <code>Document</code> object, following the
@@ -38887,7 +38851,7 @@
   <code>Document</code>.</p>
 
 
-  <h4 id=read-text><span class=secno>5.9.4 </span><dfn title=navigate-text>Page load processing model for text files</dfn></h4>
+  <h4 id=read-text><span class=secno>5.10.4 </span><dfn title=navigate-text>Page load processing model for text files</dfn></h4>
 
   <p>When a plain text document is to be loaded in a <a href=#browsing-context>browsing
   context</a>, the user agent should create a <code>Document</code>
@@ -38929,7 +38893,7 @@
   etc.</p>
 
 
-  <h4 id=read-image><span class=secno>5.9.5 </span><dfn title=navigate-image>Page load processing model for images</dfn></h4>
+  <h4 id=read-image><span class=secno>5.10.5 </span><dfn title=navigate-image>Page load processing model for images</dfn></h4>
 
   <p>When an image resource is to be loaded in a <a href=#browsing-context>browsing
   context</a>, the user agent should create a <code>Document</code>
@@ -38962,7 +38926,7 @@
   script, to give the document a <code><a href=#the-title-element>title</a></code>, etc.</p>
 
 
-  <h4 id=read-plugin><span class=secno>5.9.6 </span><dfn title=navigate-plugin>Page load processing model for content that uses plugins</dfn></h4>
+  <h4 id=read-plugin><span class=secno>5.10.6 </span><dfn title=navigate-plugin>Page load processing model for content that uses plugins</dfn></h4>
 
   <p>When a resource that requires an external resource to be rendered
   is to be loaded in a <a href=#browsing-context>browsing context</a>, the user agent
@@ -38999,7 +38963,7 @@
   context</a>, the synthesized <code><a href=#the-embed-element>embed</a></code> element will <a href=#sandboxPluginEmbed>fail to render the content</a>.</p>
 
 
-  <h4 id=read-ua-inline><span class=secno>5.9.7 </span><dfn title=navigate-ua-inline>Page load processing model for inline content that doesn't have a DOM</dfn></h4>
+  <h4 id=read-ua-inline><span class=secno>5.10.7 </span><dfn title=navigate-ua-inline>Page load processing model for inline content that doesn't have a DOM</dfn></h4>
 
   <p>When the user agent is to display a user agent page inline in a
   <a href=#browsing-context>browsing context</a>, the user agent should create a
@@ -39027,7 +38991,7 @@
 
 
 
-  <h4 id=scroll-to-fragid><span class=secno>5.9.8 </span><dfn title=navigate-fragid>Navigating to a fragment identifier</dfn></h4>
+  <h4 id=scroll-to-fragid><span class=secno>5.10.8 </span><dfn title=navigate-fragid>Navigating to a fragment identifier</dfn></h4>
 
   <p>When a user agent is supposed to navigate to a fragment
   identifier, then the user agent must <a href=#update-the-session-history-with-the-new-page>update the session
@@ -39084,7 +39048,7 @@
   element; otherwise there is no <i>target element</i>. <a href=#refsSELECTORS>[SELECTORS]</a></p>
 
 
-  <h4 id=history-traversal><span class=secno>5.9.9 </span>History traversal</h4>
+  <h4 id=history-traversal><span class=secno>5.10.9 </span>History traversal</h4>
 
   <p>When a user agent is required to <dfn id=traverse-the-history>traverse the history</dfn>
   to a <i>specified entry</i>, the user agent must act as
@@ -39113,19 +39077,7 @@
    <code>Document</code> object than the <a href=#current-entry>current entry</a>
    then the user agent must run the following substeps:</p>
 
-    <ol><li><p>Freeze the <a href=#active-document>active document</a>'s <a href=#current-script-group>current
-     script group</a>, as well as the <a href=#current-script-group>current script
-     group</a> of any <a href=#active-document title="active document">active
-     documents</a> in <a href=#nested-browsing-context title="nested browsing context">nested
-     browsing contexts</a>.</li>
-
-     <li>The user agent must move any properties that have been added
-     to the browsing context's default view's <code><a href=#window>Window</a></code>
-     object to the <a href=#active-document>active document</a>'s
-     <code>Document</code>'s <a href=#list-of-added-properties>list of added
-     properties</a>.</li>
-
-     <li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
+    <ol><li>If the browsing context is a <a href=#top-level-browsing-context>top-level browsing
      context</a> (and not an <a href=#auxiliary-browsing-context>auxiliary browsing
      context</a>), and the <a href=#origin-0>origin</a> of the
      <code>Document</code> of the <i>specified entry</i> is not the
@@ -39164,17 +39116,6 @@
 
       </ol></li>
 
-     <li>The user agent must move any properties that have been added
-     to the <a href=#active-document>active document</a>'s <code>Document</code>'s
-     <a href=#list-of-added-properties>list of added properties</a> to browsing context's
-     default view's <code><a href=#window>Window</a></code> object.</li>
-
-     <li><p>Unfreeze the <a href=#active-document>active document</a>'s <a href=#current-script-group>current
-     script group</a>, as well as the <a href=#current-script-group>current script
-     group</a> of any <a href=#active-document title="active document">active
-     documents</a> in <a href=#nested-browsing-context title="nested browsing context">nested
-     browsing contexts</a>.</li>
-
     </ol></li>
 
    <li><p>If the <i>specified entry</i> is a state object or the
@@ -39203,7 +39144,7 @@
 
 
 
-  <h4 id=unloading-documents><span class=secno>5.9.10 </span>Unloading documents</h4>
+  <h4 id=unloading-documents><span class=secno>5.10.10 </span>Unloading documents</h4>
 
   <p>When a user agent is to <dfn id=unload-a-document>unload a document</dfn>, it must run
   the following steps. These steps are passed an argument, <var title="">recycle</var>, which is either true or false, indicating
@@ -39217,8 +39158,7 @@
    which does not bubble but is cancelable.</li>
 
    <li><p>Dispatch <var title="">event</var> at the
-   <code><a href=#window>Window</a></code> object of the <code>Document</code>'s
-   <a href=#browsing-context>browsing context</a>.</li>
+   <code>Document</code>'s <code><a href=#window>Window</a></code> object.</li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</li>
@@ -39244,22 +39184,22 @@
 
    </li>
 
-   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-unload>unload</code> at the <code><a href=#window>Window</a></code>
-   object of the <code>Document</code>'s <a href=#browsing-context>browsing
-   context</a>.</li>
+   <li><p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-unload>unload</code> at the <code>Document</code>'s
+   <code><a href=#window>Window</a></code> object.</li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</li>
 
    <li><p>If there are any outstanding transactions that have
    callbacks that involve <a href=#concept-script title=concept-script>scripts</a>
-   that are in the document's <a href=#current-script-group>current script group</a>, roll
-   them back (without invoking any of the callbacks) and set <var title="">salvageable</var> to false.</p>
+   whose <a href="#script's-global-object" title="script's global object">global object</a> is
+   the <code>Document</code>'s <code><a href=#window>Window</a></code> object, roll them
+   back (without invoking any of the callbacks) and set <var title="">salvageable</var> to false.</p>
 
    <li><p>If <var title="">salvageable</var> and <var title="">recycle</var> are both false, <a href=#discard-a-document title="discard a
    document">discard the <code>Document</code></a>.</li>
 
-  </ol><h5 id=event-definition><span class=secno>5.9.10.1 </span>Event definition</h5>
+  </ol><h5 id=event-definition><span class=secno>5.10.10.1 </span>Event definition</h5>
 
   <pre class=idl>interface <dfn id=beforeunloadevent>BeforeUnloadEvent</dfn> : Event {
            attribute DOMString <a href=#dom-beforeunloadevent-returnvalue title=dom-BeforeUnloadEvent-returnValue>returnValue</a>;
@@ -39277,11 +39217,11 @@
 
 
 
-  <h3 id=structured-client-side-storage><span class=secno>5.10 </span>Structured client-side storage</h3>
+  <h3 id=structured-client-side-storage><span class=secno>5.11 </span>Structured client-side storage</h3>
 
-  <h4 id=storage><span class=secno>5.10.1 </span>Storing name/value pairs</h4>
+  <h4 id=storage><span class=secno>5.11.1 </span>Storing name/value pairs</h4>
 
-  <h5 id=introduction-2><span class=secno>5.10.1.1 </span>Introduction</h5>
+  <h5 id=introduction-2><span class=secno>5.11.1.1 </span>Introduction</h5>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -39383,7 +39323,7 @@
   convert it to a string.</p>
 
 
-  <h5 id=the-storage-interface><span class=secno>5.10.1.2 </span>The <code><a href=#storage-0>Storage</a></code> interface</h5>
+  <h5 id=the-storage-interface><span class=secno>5.11.1.2 </span>The <code><a href=#storage-0>Storage</a></code> interface</h5>
 
   <pre class=idl>interface <dfn id=storage-0>Storage</dfn> {
   readonly attribute unsigned long <a href=#dom-storage-length title=dom-Storage-length>length</a>;
@@ -39496,7 +39436,7 @@
 
 
 
-  <h5 id=the-sessionstorage-attribute><span class=secno>5.10.1.3 </span>The <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute</h5>
+  <h5 id=the-sessionstorage-attribute><span class=secno>5.11.1.3 </span>The <code title=dom-sessionStorage><a href=#dom-sessionstorage>sessionStorage</a></code> attribute</h5>
 
   <p>The <dfn id=dom-sessionstorage title=dom-sessionStorage><code>sessionStorage</code></dfn>
   attribute represents the set of storage areas specific to the
@@ -39556,7 +39496,7 @@
   storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.</p>
 
 
-  <h5 id=the-localstorage-attribute><span class=secno>5.10.1.4 </span>The <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute</h5>
+  <h5 id=the-localstorage-attribute><span class=secno>5.11.1.4 </span>The <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute</h5>
 
   <p>The <dfn id=dom-localstorage title=dom-localStorage><code>localStorage</code></dfn>
   object provides a <code><a href=#storage-0>Storage</a></code> object for an
@@ -39576,10 +39516,9 @@
   <p>When the <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code>
   attribute is accessed, the user agent must check to see if it has
   allocated a local storage area for the <a href=#origin-0>origin</a> of the
-  <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing context</a> of
-  the <code><a href=#window>Window</a></code> object on which the method was invoked. If
-  it has not, a new storage area for that <a href=#origin-0>origin</a> must be
-  created.</p>
+  <code>Document</code> of the <code><a href=#window>Window</a></code> object on which the
+  method was invoked. If it has not, a new storage area for that
+  <a href=#origin-0>origin</a> must be created.</p>
 
   <p>The user agent must then return the <code><a href=#storage-0>Storage</a></code> object
   associated with that origin's local storage area. Each
@@ -39595,7 +39534,7 @@
   storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.</p>
 
 
-  <h5 id=the-storage-event><span class=secno>5.10.1.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h5>
+  <h5 id=the-storage-event><span class=secno>5.11.1.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h5>
 
   <!-- XXX fix up for workers: target is wrong, source and storageArea
   definitions are wrong -->
@@ -39609,9 +39548,9 @@
   <p>When this happens, the user agent must dispatch an event with the
   name <code><a href=#storage-0>storage</a></code>, with no namespace, which does not bubble
   but is cancelable, and which uses the <code><a href=#storageevent>StorageEvent</a></code>
-  interface, at each <code><a href=#window>Window</a></code> object whose <a href=#active-document>active
-  document</a> has a <code><a href=#storage-0>Storage</a></code> object that is
-  affected.</p>
+  interface, at each <code><a href=#window>Window</a></code> object whose
+  <code>Document</code> object both has a <code><a href=#storage-0>Storage</a></code> object
+  that is affected, and is <a href=#fully-active>fully active</a>.</p>
 
   <p>If the event is being fired due to an invocation of the
   <code title=dom-Storage-setItem><a href=#dom-storage-setitem>setItem()</a></code> or <code title=dom-Storage-removeItem><a href=#dom-storage-removeitem>removeItem()</a></code> methods, the
@@ -39629,27 +39568,27 @@
 
   <p>In addition, the event must have its <code title=dom-StorageEvent-url><a href=#dom-storageevent-url>url</a></code> attribute set to <a href="#the-document's-address" title="the document's address">the address of the document</a>
   whose <code><a href=#storage-0>Storage</a></code> object was affected; its <code title=dom-StorageEvent-source><a href=#dom-storageevent-source>source</a></code> attribute set to the
-  <code><a href=#window>Window</a></code> object of the <a href=#browsing-context>browsing context</a> that
-  that document is in, if the two documents are in the same <a href=#unit-of-related-browsing-contexts>unit
-  of related browsing contexts</a>, or null otherwise; and its
-  <code title=dom-StorageEvent-storageArea><a href=#dom-storageevent-storagearea>storageArea</a></code>
-  attribute set to the <code><a href=#storage-0>Storage</a></code> object from the
-  <code><a href=#window>Window</a></code> object of the target <code>Document</code> that
-  represents the same kind of <code><a href=#storage-0>Storage</a></code> area as was
-  affected (i.e. session or local).</p>
+  that document's <a href=#browsing-context>browsing context</a>'s
+  <code><a href=#windowproxy>WindowProxy</a></code> object, if the two documents are in the
+  same <a href=#unit-of-related-browsing-contexts>unit of related browsing contexts</a>, or null
+  otherwise; and its <code title=dom-StorageEvent-storageArea><a href=#dom-storageevent-storagearea>storageArea</a></code> attribute
+  set to the <code><a href=#storage-0>Storage</a></code> object from the <code><a href=#window>Window</a></code>
+  object of the target <code>Document</code> that represents the same
+  kind of <code><a href=#storage-0>Storage</a></code> area as was affected (i.e. session or
+  local).</p>
 
 
-  <h6 id=event-definition-0><span class=secno>5.10.1.5.1 </span>Event definition</h6>
+  <h6 id=event-definition-0><span class=secno>5.11.1.5.1 </span>Event definition</h6>
 
   <pre class=idl>interface <dfn id=storageevent>StorageEvent</dfn> : Event {
   readonly attribute DOMString <a href=#dom-storageevent-key title=dom-StorageEvent-key>key</a>;
   readonly attribute DOMString <a href=#dom-storageevent-oldvalue title=dom-StorageEvent-oldValue>oldValue</a>;
   readonly attribute DOMString <a href=#dom-storageevent-newvalue title=dom-StorageEvent-newValue>newValue</a>;
   readonly attribute DOMString <a href=#dom-storageevent-url title=dom-StorageEvent-url>url</a>;
-  readonly attribute <a href=#window>Window</a> <a href=#dom-storageevent-source title=dom-StorageEvent-source>source</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-storageevent-source title=dom-StorageEvent-source>source</a>;
   readonly attribute <a href=#storage-0>Storage</a> <a href=#dom-storageevent-storagearea title=dom-StorageEvent-storageArea>storageArea</a>;
-  void <a href=#dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent>initStorageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <a href=#window>Window</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg);
-  void <a href=#dom-storageevent-initstorageeventns title=dom-StorageEvent-initStorageEventNS>initStorageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <a href=#window>Window</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg);
+  void <a href=#dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent>initStorageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <a href=#windowproxy>WindowProxy</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg);
+  void <a href=#dom-storageevent-initstorageeventns title=dom-StorageEvent-initStorageEventNS>initStorageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <a href=#windowproxy>WindowProxy</a> sourceArg, in <a href=#storage-0>Storage</a> storageAreaArg);
 };</pre>
 
   <p>The <dfn id=dom-storageevent-initstorageevent title=dom-StorageEvent-initStorageEvent><code>initStorageEvent()</code></dfn>
@@ -39671,8 +39610,8 @@
   changed.</p>
 
   <p>The <dfn id=dom-storageevent-source title=dom-StorageEvent-source><code>source</code></dfn> attribute
-  represents the <code><a href=#window>Window</a></code> object of the document whose key
-  changed.</p>
+  represents the <code><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context>browsing
+  context</a> of the document whose key changed.</p>
 
   <p>The <dfn id=dom-storageevent-storagearea title=dom-StorageEvent-storageArea><code>storageArea</code></dfn>
   attribute represents the <code><a href=#storage-0>Storage</a></code> object that was
@@ -39680,7 +39619,7 @@
 
 
 
-  <h5 id=threads><span class=secno>5.10.1.6 </span>Threads</h5>
+  <h5 id=threads><span class=secno>5.11.1.6 </span>Threads</h5>
 
   <p>Multiple browsing contexts must be able to access the local
   storage areas simultaneously in such a manner that scripts cannot
@@ -39707,7 +39646,7 @@
 
 
 
-  <h4 id=sql><span class=secno>5.10.2 </span>Database storage</h4>
+  <h4 id=sql><span class=secno>5.11.2 </span>Database storage</h4>
 
   <!-- Feature requests for future versions (v2):
         * deleting databases
@@ -39715,7 +39654,7 @@
         * handling the database getting corrupted
   -->
 
-  <h5 id=introduction-3><span class=secno>5.10.2.1 </span>Introduction</h5>
+  <h5 id=introduction-3><span class=secno>5.11.2.1 </span>Introduction</h5>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -39730,7 +39669,7 @@
    executeSql('SELECT rowid FROM t WHERE c IN (' + q + ')', array, ...);
 -->
 
-  <h5 id=databases><span class=secno>5.10.2.2 </span>Databases</h5>
+  <h5 id=databases><span class=secno>5.11.2.2 </span>Databases</h5>
 
   <p>Each <i><a href=#origin-0>origin</a></i> has an associated set of databases. Each
   database has a name and a current version. There is no way to
@@ -39752,8 +39691,8 @@
 
   <p>The <code title=dom-opendatabase><a href=#dom-opendatabase>openDatabase()</a></code> method
   must use and create databases from the <a href=#origin-0>origin</a> of the
-  <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing context</a> of
-  the <code><a href=#window>Window</a></code> object on which the method was invoked.</p>
+  <code>Document</code> of the <code><a href=#window>Window</a></code> object on which the
+  method was invoked.</p>
 
   <p>If the database version provided is not the empty string, and the
   database already exists but has a different version, or no version,
@@ -39864,7 +39803,7 @@
   </ol><p>...and the <i>mode</i> being read/write.</p>
 
 
-  <h5 id=executing-sql-statements><span class=secno>5.10.2.3 </span>Executing SQL statements</h5>
+  <h5 id=executing-sql-statements><span class=secno>5.11.2.3 </span>Executing SQL statements</h5>
 
   <p>The <code title=dom-database-transaction><a href=#dom-database-transaction>transaction()</a></code>
   and <code title=dom-database-changeVersion><a href=#dom-database-changeversion>changeVersion()</a></code>
@@ -39973,7 +39912,7 @@
   define the exact SQL subset required in more detail.</p>
 
 
-  <h5 id=database-query-results><span class=secno>5.10.2.4 </span>Database query results</h5>
+  <h5 id=database-query-results><span class=secno>5.11.2.4 </span>Database query results</h5>
 
   <p>The <code title=dom-transaction-executeSql>executeSql()</code>
   method invokes its callback with a <code><a href=#sqlresultset>SQLResultSet</a></code> object
@@ -40035,7 +39974,7 @@
   by the database.</p>
 
 
-  <h5 id=errors><span class=secno>5.10.2.5 </span>Errors</h5>
+  <h5 id=errors><span class=secno>5.11.2.5 </span>Errors</h5>
 
   <p>Errors in the database API are reported using callbacks that have
   a <code><a href=#sqlerror>SQLError</a></code> object as one of their arguments.</p>
@@ -40098,7 +40037,7 @@
 
 
 
-  <h5 id=processing-model-2><span class=secno>5.10.2.6 </span>Processing model</h5>
+  <h5 id=processing-model-2><span class=secno>5.11.2.6 </span>Processing model</h5>
 
   <p>The <dfn id=transaction-steps>transaction steps</dfn> are as follows. These steps must
   be run asynchronously. These steps are invoked with a <i>transaction
@@ -40226,7 +40165,7 @@
    transaction. Rollback the transaction. Any still-pending statements
    in the transaction are discarded.</li>
 
-  </ol><h4 id=disk-space><span class=secno>5.10.3 </span>Disk space</h4>
+  </ol><h4 id=disk-space><span class=secno>5.11.3 </span>Disk space</h4>
 
   <p>User agents should limit the total amount of space allowed for
   storage areas and databases.</p>
@@ -40253,9 +40192,9 @@
   update this suggestion in future.</p>
 
 
-  <h4 id=privacy><span class=secno>5.10.4 </span>Privacy</h4>
+  <h4 id=privacy><span class=secno>5.11.4 </span>Privacy</h4>
 
-  <h5 id=user-tracking><span class=secno>5.10.4.1 </span>User tracking</h5>
+  <h5 id=user-tracking><span class=secno>5.11.4.1 </span>User tracking</h5>
 
   <p>A third-party advertiser (or any entity capable of getting
   content distributed to multiple sites) could use a unique identifier
@@ -40370,7 +40309,7 @@
   separate sessions into coherent user profiles.</p>
 
 
-  <h5 id=cookie-resurrection><span class=secno>5.10.4.2 </span>Cookie resurrection</h5>
+  <h5 id=cookie-resurrection><span class=secno>5.11.4.2 </span>Cookie resurrection</h5>
 
   <p>If the user interface for persistent storage presents data in the
   persistent storage features separately from data in HTTP session
@@ -40380,9 +40319,9 @@
   privacy.</p>
 
 
-  <h4 id=security-4><span class=secno>5.10.5 </span>Security</h4>
+  <h4 id=security-4><span class=secno>5.11.5 </span>Security</h4>
 
-  <h5 id=dns-spoofing-attacks><span class=secno>5.10.5.1 </span>DNS spoofing attacks</h5>
+  <h5 id=dns-spoofing-attacks><span class=secno>5.11.5.1 </span>DNS spoofing attacks</h5>
 
   <p>Because of the potential for DNS spoofing attacks, one cannot
   guarantee that a host claiming to be in a certain domain really is
@@ -40392,7 +40331,7 @@
   local storage areas and databases.</p>
 
 
-  <h5 id=cross-directory-attacks><span class=secno>5.10.5.2 </span>Cross-directory attacks</h5>
+  <h5 id=cross-directory-attacks><span class=secno>5.11.5.2 </span>Cross-directory attacks</h5>
 
   <p>Different authors sharing one host name, for example users
   hosting content on <code>geocities.com</code>, all share one
@@ -40408,7 +40347,7 @@
   path.</p>
 
 
-  <h5 id=implementation-risks><span class=secno>5.10.5.3 </span>Implementation risks</h5>
+  <h5 id=implementation-risks><span class=secno>5.11.5.3 </span>Implementation risks</h5>
 
   <p>The two primary risks when implementing these persistent storage
   features are letting hostile sites read information from other
@@ -40433,7 +40372,7 @@
   in this specification is important for user security.</p>
 
 
-  <h5 id=sql-and-user-agents><span class=secno>5.10.5.4 </span>SQL and user agents</h5>
+  <h5 id=sql-and-user-agents><span class=secno>5.11.5.4 </span>SQL and user agents</h5>
 
   <p>User agent implementors are strongly encouraged to audit all
   their supported SQL statements for security implications. For
@@ -40447,7 +40386,7 @@
   ECMAScript is implicitly UTF-16.</p>
 
 
-  <h5 id=sql-injection><span class=secno>5.10.5.5 </span>SQL injection</h5>
+  <h5 id=sql-injection><span class=secno>5.11.5.5 </span>SQL injection</h5>
 
   <p>Authors are strongly recommended to make use of the <code title="">?</code> placeholder feature of the <code title=dom-sqltransaction-executeSql><a href=#dom-sqltransaction-executesql>executeSql()</a></code> method,
   and to never construct SQL statements on the fly.</p>
@@ -40456,10 +40395,10 @@
 
 
 
-  <h3 id=links><span class=secno>5.11 </span>Links</h3>
+  <h3 id=links><span class=secno>5.12 </span>Links</h3>
 
 
-  <h4 id=hyperlink-elements><span class=secno>5.11.1 </span>Hyperlink elements</h4>
+  <h4 id=hyperlink-elements><span class=secno>5.12.1 </span>Hyperlink elements</h4>
 
   <p>The <code><a href=#the-a-element>a</a></code>, <code><a href=#the-area-element>area</a></code>, and <code><a href=#the-link-element>link</a></code>
   elements can, in certain situations described in the definitions of
@@ -40534,7 +40473,7 @@
 
 
 
-  <h4 id=following-hyperlinks><span class=secno>5.11.2 </span><dfn>Following hyperlinks</dfn></h4>
+  <h4 id=following-hyperlinks><span class=secno>5.12.2 </span><dfn>Following hyperlinks</dfn></h4>
 
   <p>When a user <em>follows a hyperlink</em>, the user agent must
   <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a>
@@ -40592,7 +40531,7 @@
   <a href=#source-browsing-context>source browsing context</a>.</p>
 
 
-  <h5 id=hyperlink-auditing><span class=secno>5.11.2.1 </span>Hyperlink auditing</h5>
+  <h5 id=hyperlink-auditing><span class=secno>5.12.2.1 </span>Hyperlink auditing</h5>
 
   <p>If an <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> hyperlink element has a
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the
@@ -40720,7 +40659,7 @@
 
 
 
-  <h4 id=linkTypes><span class=secno>5.11.3 </span>Link types</h4>
+  <h4 id=linkTypes><span class=secno>5.12.3 </span>Link types</h4>
 
   <p>The following table summarizes the link types that are defined by
   this specification. This table is non-normative; the actual
@@ -40889,7 +40828,7 @@
     -->
 
 
-  <h5 id=link-type-alternate><span class=secno>5.11.3.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
+  <h5 id=link-type-alternate><span class=secno>5.12.3.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
 
   <p>The <code title=rel-alternate><a href=#link-type-alternate>alternate</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -40950,7 +40889,7 @@
   alternative representations of each other.</p>
 
 
-  <h5 id=link-type-archives><span class=secno>5.11.3.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
+  <h5 id=link-type-archives><span class=secno>5.12.3.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
 
   <p>The <code title=rel-archives><a href=#link-type-archives>archives</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -40968,7 +40907,7 @@
   <code title=rel-archives><a href=#link-type-archives>archives</a></code> keyword.</p>
 
 
-  <h5 id=link-type-author><span class=secno>5.11.3.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
+  <h5 id=link-type-author><span class=secno>5.12.3.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
 
   <p>The <code title=rel-author><a href=#link-type-author>author</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -40993,7 +40932,7 @@
   relationship.</p>
 
 
-  <h5 id=link-type-bookmark><span class=secno>5.11.3.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
+  <h5 id=link-type-bookmark><span class=secno>5.12.3.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
 
   <p>The <code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements.</p>
@@ -41054,7 +40993,7 @@
   page as a whole.</p>
 -->
 
-  <h5 id=link-type-external><span class=secno>5.11.3.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
+  <h5 id=link-type-external><span class=secno>5.12.3.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
 
   <p>The <code title=rel-external><a href=#link-type-external>external</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements.</p>
@@ -41064,7 +41003,7 @@
   that the current document forms a part of.</p>
 
 
-  <h5 id=link-type-feed><span class=secno>5.11.3.6 </span>Link type "<dfn title=rel-feed><code>feed</code></dfn>"</h5>
+  <h5 id=link-type-feed><span class=secno>5.12.3.6 </span>Link type "<dfn title=rel-feed><code>feed</code></dfn>"</h5>
 
   <p>The <code title=rel-feed><a href=#link-type-feed>feed</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41102,7 +41041,7 @@
   </div>
 
 
-  <h5 id=link-type-help><span class=secno>5.11.3.7 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
+  <h5 id=link-type-help><span class=secno>5.12.3.7 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
 
   <p>The <code title=rel-help><a href=#link-type-help>help</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41127,7 +41066,7 @@
   document provides help for the page as a whole.</p>
 
 
-  <h5 id=rel-icon><span class=secno>5.11.3.8 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
+  <h5 id=rel-icon><span class=secno>5.12.3.8 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
 
   <p>The <code title=rel-icon><a href=#rel-icon>icon</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code> elements, for which it creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -41233,7 +41172,7 @@
   </div>
 
 
-  <h5 id=link-type-license><span class=secno>5.11.3.9 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
+  <h5 id=link-type-license><span class=secno>5.12.3.9 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
 
   <p>The <code title=rel-license><a href=#link-type-license>license</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41248,7 +41187,7 @@
   the <code title=rel-license><a href=#link-type-license>license</a></code> keyword.</p>
 
 
-  <h5 id=link-type-nofollow><span class=secno>5.11.3.10 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
+  <h5 id=link-type-nofollow><span class=secno>5.12.3.10 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
 
   <p>The <code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements.</p>
@@ -41260,7 +41199,7 @@
   affiliated with the two pages.</p>
 
 
-  <h5 id=link-type-noreferrer><span class=secno>5.11.3.11 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
+  <h5 id=link-type-noreferrer><span class=secno>5.12.3.11 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
 
   <p>The <code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements.</p>
@@ -41274,7 +41213,7 @@
   hyperlink creates a new <a href=#browsing-context>browsing context</a>.</p>
 
 
-  <h5 id=link-type-pingback><span class=secno>5.11.3.12 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
+  <h5 id=link-type-pingback><span class=secno>5.12.3.12 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
 
   <p>The <code title=rel-pingback><a href=#link-type-pingback>pingback</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements, for which it creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -41283,7 +41222,7 @@
   specification. <a href=#refsPINGBACK>[PINGBACK]</a></p>
 
 
-  <h5 id=link-type-prefetch><span class=secno>5.11.3.13 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
+  <h5 id=link-type-prefetch><span class=secno>5.12.3.13 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
 
   <p>The <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements, for which it creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -41296,7 +41235,7 @@
   <p>There is no default type for resources given by the <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword.</p>
 
 
-  <h5 id=link-type-search><span class=secno>5.11.3.14 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
+  <h5 id=link-type-search><span class=secno>5.12.3.14 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
 
   <p>The <code title=rel-search><a href=#link-type-search>search</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41313,7 +41252,7 @@
   -->
 
 
-  <h5 id=link-type-stylesheet><span class=secno>5.11.3.15 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
+  <h5 id=link-type-stylesheet><span class=secno>5.12.3.15 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
 
   <p>The <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements, for which it creates an <a href=#external-resource-link title="external resource link">external resource link</a> that
@@ -41336,7 +41275,7 @@
   instead assume it to be <code title="">text/css</code>.</p>
 
 
-  <h5 id=link-type-sidebar><span class=secno>5.11.3.16 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
+  <h5 id=link-type-sidebar><span class=secno>5.12.3.16 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
 
   <p>The <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41351,7 +41290,7 @@
   <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword specified is a <dfn id=rel-sidebar-hyperlink title=rel-sidebar-hyperlink>sidebar hyperlink</dfn>.</p>
 
 
-  <h5 id=link-type-tag><span class=secno>5.11.3.17 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
+  <h5 id=link-type-tag><span class=secno>5.12.3.17 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
 
   <p>The <code title=rel-tag><a href=#link-type-tag>tag</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41367,7 +41306,7 @@
   the popular tag across a set of pages.</p>
 
 
-  <h5 id=hierarchical-link-types><span class=secno>5.11.3.18 </span>Hierarchical link types</h5>
+  <h5 id=hierarchical-link-types><span class=secno>5.12.3.18 </span>Hierarchical link types</h5>
 
   <p>Some documents form part of a hierarchical structure of
   documents.</p>
@@ -41380,7 +41319,7 @@
   <p>A document may be part of multiple hierarchies.</p>
 
 
-  <h6 id=link-type-index><span class=secno>5.11.3.18.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
+  <h6 id=link-type-index><span class=secno>5.12.3.18.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
 
   <p>The <code title=rel-index><a href=#link-type-index>index</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41396,7 +41335,7 @@
   <code title=rel-index><a href=#link-type-index>index</a></code> keyword.</p>
 
 
-  <h6 id=link-type-up><span class=secno>5.11.3.18.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
+  <h6 id=link-type-up><span class=secno>5.12.3.18.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
 
   <p>The <code title=rel-up><a href=#link-type-up>up</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41457,7 +41396,7 @@
   interface hides duplicates).</p>
 
 
-  <h5 id=sequential-link-types><span class=secno>5.11.3.19 </span>Sequential link types</h5>
+  <h5 id=sequential-link-types><span class=secno>5.12.3.19 </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.</p>
 
@@ -41469,7 +41408,7 @@
   <p>A document may be part of multiple sequences.</p>
 
 
-  <h6 id=link-type-first><span class=secno>5.11.3.19.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
+  <h6 id=link-type-first><span class=secno>5.12.3.19.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
 
   <p>The <code title=rel-first><a href=#link-type-first>first</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41484,7 +41423,7 @@
   "<code title="">start</code>" like the <code title=rel-first><a href=#link-type-first>first</a></code> keyword.</p>
 
 
-  <h6 id=link-type-last><span class=secno>5.11.3.19.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
+  <h6 id=link-type-last><span class=secno>5.12.3.19.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
 
   <p>The <code title=rel-last><a href=#link-type-last>last</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41499,7 +41438,7 @@
   <code title=rel-last><a href=#link-type-last>last</a></code> keyword.</p>
 
 
-  <h6 id=link-type-next><span class=secno>5.11.3.19.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
+  <h6 id=link-type-next><span class=secno>5.12.3.19.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
 
   <p>The <code title=rel-next><a href=#link-type-next>next</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41510,7 +41449,7 @@
   document that is the next logical document in the sequence.</p>
 
 
-  <h6 id=link-type-prev><span class=secno>5.11.3.19.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
+  <h6 id=link-type-prev><span class=secno>5.12.3.19.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
 
   <p>The <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -41525,7 +41464,7 @@
   the <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword.</p>
 
 
-  <h5 id=other-link-types><span class=secno>5.11.3.20 </span>Other link types</h5>
+  <h5 id=other-link-types><span class=secno>5.12.3.20 </span>Other link types</h5>
 
   <p>Other than the types defined above, only types defined as
   extensions in the <a href=http://wiki.whatwg.org/wiki/RelExtensions>WHATWG Wiki
@@ -44152,10 +44091,10 @@
   readonly attribute any <a href=#dom-messageevent-data title=dom-MessageEvent-data>data</a>;
   readonly attribute DOMString <a href=#dom-messageevent-origin title=dom-MessageEvent-origin>origin</a>;
   readonly attribute DOMString <a href=#dom-messageevent-lasteventid title=dom-MessageEvent-lastEventId>lastEventId</a>;
-  readonly attribute <a href=#window>Window</a> <a href=#dom-messageevent-source title=dom-MessageEvent-source>source</a>;
+  readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-messageevent-source title=dom-MessageEvent-source>source</a>;
   readonly attribute <a href=#messageport>MessagePort</a> <a href=#dom-messageevent-messageport title=dom-MessageEvent-messagePort>messagePort</a>;
-  void <a href=#dom-messageevent-initmessageevent title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <a href=#messageport>MessagePort</a> messagePortArg);
-  void <a href=#dom-messageevent-initmessageeventns title=dom-MessageEvent-initMessageEventNS>initMessageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <a href=#messageport>MessagePort</a> messagePortArg);
+  void <a href=#dom-messageevent-initmessageevent title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <a href=#windowproxy>WindowProxy</a> sourceArg, in <a href=#messageport>MessagePort</a> messagePortArg);
+  void <a href=#dom-messageevent-initmessageeventns title=dom-MessageEvent-initMessageEventNS>initMessageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <a href=#windowproxy>WindowProxy</a> sourceArg, in <a href=#messageport>MessagePort</a> messagePortArg);
 };</pre>
 
   <p>The <dfn id=dom-messageevent-initmessageevent title=dom-MessageEvent-initMessageEvent><code>initMessageEvent()</code></dfn>
@@ -44179,7 +44118,8 @@
 
   <p>The <dfn id=dom-messageevent-source title=dom-MessageEvent-source><code>source</code></dfn> attribute
   represents, in <a href=#crossDocumentMessages>cross-document messaging</a>, the
-  <code><a href=#window>Window</a></code> from which the message came.</p>
+  <code><a href=#windowproxy>WindowProxy</a></code> of the <a href=#browsing-context>browsing context</a> of the
+  <code><a href=#window>Window</a></code> object from which the message came.</p>
 
   <p>The <dfn id=dom-messageevent-messageport title=dom-MessageEvent-messagePort><code>messagePort</code></dfn>
   attribute represents, in <a href=#crossDocumentMessages>cross-document messaging</a> and
@@ -45727,11 +45667,10 @@
 
     <p>If the <var title="">targetOrigin</var> argument has a value
     other than a single literal U+002A ASTERISK character ("*"), and
-    the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
-    context</a> of the <code><a href=#window>Window</a></code> object on which the
-    method was invoked does not have the <a href=#same-origin>same origin</a> as
-    <var title="">targetOrigin</var>, then abort these steps
-    silently.</p>
+    the <code>Document</code> of the <code><a href=#window>Window</a></code> object on
+    which the method was invoked does not have the <a href=#same-origin>same
+    origin</a> as <var title="">targetOrigin</var>, then abort
+    these steps silently.</p>
 
    </li>
 
@@ -45744,12 +45683,9 @@
     set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
     origin">Unicode serialization</a> of the <a href=#origin-0>origin</a> of
     the script that invoked the method, and the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
-    set to the <code><a href=#window>Window</a></code> object of the <a href=#default-view>default
-    view</a> of the <a href=#browsing-context>browsing context</a> for which the
-    <code>Document</code> object with which the script is associated
-    is the <a href=#active-document>active document</a><!--, if there is one, or null
-    otherwise-->.</p><!-- I think there always is one, because scripts
-    can't run and see a Window without that being the case. -->
+    set to the <a href="#script's-global-object">script's global object</a>.</p> <!-- invariant:
+    the global scope is always a Window if the script can see this
+    method -->
 
    </li>
 
@@ -45759,7 +45695,6 @@
     previous step at the <code><a href=#window>Window</a></code> object on which the
     method was invoked. The <a href=#task-source>task source</a> for this <a href=#concept-task title=concept-task>task</a> is the <a href=#posted-message-task-source>posted message task
     source</a>.</p>
-    <!-- XXX apply any body/window dispatch decisions here -->
 
    </li>
 
@@ -45818,11 +45753,10 @@
 
     <p>If the <var title="">targetOrigin</var> argument has a value
     other than a single literal U+002A ASTERISK character ("*"), and
-    the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
-    context</a> of the <code><a href=#window>Window</a></code> object on which the
-    method was invoked does not have the <a href=#same-origin>same origin</a> as
-    <var title="">targetOrigin</var>, then abort these steps
-    silently.</p>
+    the <code>Document</code> of the <code><a href=#window>Window</a></code> object on
+    which the method was invoked does not have the <a href=#same-origin>same
+    origin</a> as <var title="">targetOrigin</var>, then abort
+    these steps silently.</p>
 
    </li>
 
@@ -45835,12 +45769,9 @@
     set to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an
     origin">Unicode serialization</a> of the <a href=#origin-0>origin</a> of
     the script that invoked the method, and the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
-    set to the <code><a href=#window>Window</a></code> object of the <a href=#default-view>default
-    view</a> of the <a href=#browsing-context>browsing context</a> for which the
-    <code>Document</code> object with which the script is associated
-    is the <a href=#active-document>active document</a><!--, if there is one, or null
-    otherwise-->.</p><!-- I think there always is one, because scripts
-    can't run and see a Window without that being the case. -->
+    set to the <a href="#script's-global-object">script's global object</a>.</p> <!-- invariant:
+    the global scope is always a Window if the script can see this
+    method -->
 
    </li>
 
@@ -45857,7 +45788,6 @@
     previous step at the <code><a href=#window>Window</a></code> object on which the
     method was invoked. The <a href=#task-source>task source</a> for this <a href=#concept-task title=concept-task>task</a> is the <a href=#posted-message-task-source>posted message task
     source</a>.</p>
-    <!-- XXX apply any body/window dispatch decisions here -->
 
    </li>
 
@@ -46124,8 +46054,10 @@
   <a href=#event-loop>event loop</a> must use it as one of its <a href=#task-source title="task
   source">task sources</a>.</p>
 
-  <p class=note>If the <a href=#script-group>script group</a> of the port's event
-  handlers is <i>frozen</i>, then the messages are lost.</p>
+  <p class=note>If the <code>Document</code> of the port's event
+  handlers' <a href="#script's-global-object" title="script's global object">global object</a>
+  is not <a href=#fully-active>fully active</a>, then the messages are lost.</p>
+  <!-- because of the jump-to-entry-point algorithm first step -->
 
   <hr><p>The <dfn id=dom-messageport-close title=dom-MessagePort-close><code>close()</code></dfn>
   method, when called on a port <var title="">local port</var> that is
@@ -52830,13 +52762,13 @@
    <li>If the <code>Document</code> is in a <a href=#browsing-context>browsing
    context</a>, then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-load-event title="fire
    a load event">fire a <code title=event-load>load</code>
-   event</a> at the <a href=#browsing-context>browsing context</a>'s
-   <code><a href=#window>Window</a></code> object.</li>
+   event</a> at the <code>Document</code>'s <code><a href=#window>Window</a></code>
+   object.</li>
 
    <li>If the <code>Document</code> has a <a href=#pending-state-object>pending state
    object</a>, then <a href=#queue-a-task>queue a task</a> to fire a <code title=event-popstate><a href=#event-popstate>popstate</a></code> event in no namespace on the
-   <a href=#browsing-context>browsing context</a>'s <code><a href=#window>Window</a></code> object using
-   the <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
+   <code>Document</code>'s <code><a href=#window>Window</a></code> object using the
+   <code><a href=#popstateevent>PopStateEvent</a></code> interface, with the <code title=dom-PopStateEvent-state><a href=#dom-popstateevent-state>state</a></code> attribute set to the
    current value of the <a href=#pending-state-object>pending state object</a>. This event
    must bubble but not be cancelable and has no default action.</li>
 
@@ -56224,8 +56156,9 @@
 
   <p>For both <code title=dom-windowtimers-setTimeout><a href=#dom-windowtimers-settimeout>setTimeout()</a></code> and <code title=dom-windowtimers-setInterval><a href=#dom-windowtimers-setinterval>setInterval()</a></code>, the clock
   upon which the timers are based must only tick while the
-  <a href=#script-group>script group</a> of their callbacks is not
-  <i>frozen</i>.</p>
+  <code>Document</code> of the <a href="#script's-global-object" title="script's global
+  object">global object</a> of their callbacks is <a href=#fully-active>fully
+  active</a>.</p>
 
 
 

Modified: source
===================================================================
--- source	2009-01-30 08:39:28 UTC (rev 2726)
+++ source	2009-01-31 10:22:09 UTC (rev 2727)
@@ -5816,9 +5816,9 @@
 
   <div class="example">
 
-   <p>For example, the <code>document.defaultView</code> attribute
-   means that there is a strong reference from a <code>Document</code>
-   object to its <code>Window</code> object. Similarly, there is
+   <p>For example, the <code>document.location</code> attribute means
+   that there is a strong reference from a <code>Document</code>
+   object to its <code>Location</code> object. Similarly, there is
    always a strong reference from a <code>Document</code> to any
    descendant nodes, and from any node to its owner
    <code>Document</code>.</p>
@@ -5868,15 +5868,8 @@
   <span title="HTML documents">HTML document</span> by calling <code
   title="dom-document-open">document.open()</code> on it.</p>
 
-  <p>When a <code>Document</code> is first created, a new <span>script
-  group</span> must be created. This is the <code>Document</code>'s
-  <dfn>current script group</dfn> until the script group is changed
-  (which can happen if <code
-  title="dom-document-open">document.open()</code> is invoked on the
-  <code>Document</code>).</p>
 
 
-
   <h4>Documents in the DOM</h4>
 
   <p>All <code>Document</code> objects (in user agents implementing
@@ -5929,7 +5922,7 @@
   // <span>dynamic markup insertion</span>
            attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
   <span>HTMLDocument</span> <span title="dom-document-open">open</span>([Optional] in DOMString type, [Optional] in DOMString replace);
-  <span>Window</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
+  <span>WindowProxy</span> <span title="dom-document-open">open</span>(in DOMString url, in DOMString name, in DOMString features, [Optional] in boolean replace);
   void <span title="dom-document-close">close</span>();
   void <span title="dom-document-write">write</span>([Variadic] in DOMString text);
   void <span title="dom-document-writeln">writeln</span>([Variadic] in DOMString text);
@@ -6465,9 +6458,9 @@
 
     <p>If <var title="">elements</var> has only one element, and that
     element is an <code>iframe</code> element, then return the
-    <code>Window</code> object of the <span>default view</span> of the
-    <span>nested browsing context</span> represented by that
-    <code>iframe</code> element, and abort these steps.</p>
+    <code>WindowProxy</code> object of the <span>nested browsing
+    context</span> represented by that <code>iframe</code> element,
+    and abort these steps.</p>
 
    </li>
 
@@ -7898,23 +7891,24 @@
    XHTML, or image document, or something?</span></p></li><!-- XXX see
    also innerHTML in HTML -->
 
-   <li><p>Freeze the document's <span>current script group</span>, as
-   well as the <span>current script group</span> of any <span
-   title="active document">active documents</span> in <span
-   title="nested browsing context">nested browsing
-   contexts</span>.</p></li>
-
    <li><p>Unregister all event listeners registered on the
    <code>Document</code> node and its descendants.</p>
 
    <li><p>Remove all child nodes of the document, without firing any
    mutation events.</p></li>
 
-   <li><p>Create a new <span>script group</span> and let the
-   document's <span>current script group</span> be that new
-   group. (The old script group is now permanently frozen.)</p></li>
+   <li><p>Replace the <code>Document</code>'s singleton objects with
+   new instances of those objects. (This includes in particular the
+   <code>Window</code>, <code>Location</code>, <code>History</code>,
+   <code>ApplicationCache</code>, <code>UndoManager</code>,
+   <code>Navigator</code>, and <code>Selection</code> objects, the
+   various <code>BarProp</code> objects, the two <code>Storage</code>
+   objects, and the various <code>HTMLCollection</code> objects. It
+   also includes all the WebIDL prototypes in the ECMAScript binding,
+   including the <code>Document</code> object's prototype.)</p></li>
 
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
 
    <li><p>Change the <span>document's character encoding</span> to
    UTF-16.</p></li>
@@ -8005,15 +7999,11 @@
   title="dom-document-open">open()</code> method on the
   <code>HTMLDocument</code> object must call the <code
   title="dom-open">open()</code> method on the <code>Window</code>
-  interface of the object returned by the <code
-  title="dom-document-defaultView">defaultView</code> attribute of the
-  <code>DocumentView</code> interface of the <code>HTMLDocument</code>
-  object, with the same arguments as the original call to the <code
+  object of the <code>HTMLDocument</code> object, with the same
+  arguments as the original call to the <code
   title="dom-document-open">open()</code> method, and return whatever
-  that method returned. If the <code
-  title="dom-document-defaultView">defaultView</code> attribute of the
-  <code>DocumentView</code> interface of the <code>HTMLDocument</code>
-  object is null, then the method must raise an
+  that method returned. If the <code>HTMLDocument</code> object has no
+  <code>Window</code> object, then the method must raise an
   <code>INVALID_ACCESS_ERR</code> exception.</p>
 
   <p>The <dfn title="dom-document-close"><code>close()</code></dfn>
@@ -17164,7 +17154,7 @@
            attribute DOMString <span title="dom-dim-height">height</span>;
 <!-- XXX we should bring these back since the Window spec has atrophied
   readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
-  readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-iframe-contentWindow">contentWindow</span>;
 -->};</pre>
     <p>Objects implementing the <code>HTMLIFrameElement</code>
     interface must also implement the <code>EmbeddingElement</code>
@@ -17188,8 +17178,9 @@
   <code>iframe</code> element's document's <span>browsing
   context</span> as the <span>source browsing context</span>. If the
   user <span title="navigate">navigates</span> away from this page,
-  the <code>iframe</code>'s corresponding <code>Window</code> object
-  will reference new <code>Document</code> objects, but the <code
+  the <code>iframe</code>'s corresponding <code>WindowProxy</code>
+  object will proxy new <code>Window</code> objects for new
+  <code>Document</code> objects, but the <code
   title="attr-iframe-src">src</code> attribute will not change.</p>
 
   <p>Whenever the <code title="attr-iframe-src">src</code> attribute
@@ -17835,10 +17826,11 @@
            attribute DOMString <span title="dom-object-useMap">useMap</span>;
   readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
            attribute DOMString <span title="dom-dim-width">width</span>;
-           attribute DOMString <span title="dom-dim-height">height</span>;<!-- XXX
+           attribute DOMString <span title="dom-dim-height">height</span>;
+<!-- XXX we should bring these back since the Window spec has atrophied
   readonly attribute Document <span title="dom-object-contentDocument">contentDocument</span>;
-  readonly attribute <span>Window</span> <span title="dom-object-contentWindow">contentWindow</span>;-->
-};</pre>
+  readonly attribute <span>WindowProxy</span> <span title="dom-object-contentWindow">contentWindow</span>;
+-->};</pre>
     <p>Objects implementing the <code>HTMLObjectElement</code>
     interface must also implement the <code>EmbeddingElement</code>
     interface defined in the Window Object specification. <a
@@ -37624,28 +37616,43 @@
   requirements defined in this section <em>do</em> apply to all user
   agents, whether they are Web browsers or not.</p>
 
+
   <h3 id="windows">Browsing contexts</h3>
 
-  <p>A <dfn>browsing context</dfn> is a collection of one or more
-  <code>Document</code> objects, and one or more <span
-  title="view">views</span>.</p>
+  <p>A <dfn>browsing context</dfn> is an environment in which
+  <code>Document</code> objects are presented to the user. At any
+  time, one <code>Document</code> is designated the <dfn>active
+  document</dfn>. The collection of <code>Document</code>s is the
+  <span>browsing context</span>'s <span>session history</span>.</p>
 
-  <p>At any one time, one of the <code>Document</code>s in a
-  <span>browsing context</span> is the <dfn>active document</dfn>. The
-  collection of <code>Document</code>s is the <span>browsing
-  context</span>'s <span>session history</span>.</p>
+  <p>Each <span>browsing context</span> has a corresponding
+  <code>WindowProxy</code> object.</p>
 
+  <p>Each <code>Document</code> has a collection of one or more <span
+  title="view">views</span>.</p>
+
   <p>A <dfn>view</dfn> is a user agent interface tied to a particular
-  media used for the presentation of <code>Document</code> objects in
-  some media. A view may be interactive. Each view is represented by
-  an <code>AbstractView</code> object. Each view belongs to a
-  <span>browsing context</span>. <a
+  media used for the presentation of a particular
+  <code>Document</code> object in some media. A view may be
+  interactive. Each view is represented by an
+  <code>AbstractView</code> object. <a
   href="#refsDOM2VIEWS">[DOM2VIEWS]</a></p>
 
+  <p>The main <span>view</span> through which a user primarily
+  interacts with a user agent is the <dfn>default view</dfn>. The
+  <code>AbstractView</code> object that represents this view must also
+  implement the <code>Window</code> interface, and is referred to as
+  the <code>Document</code>'s <code>Window</code> object.</p>
+
+  <p class="note">The <span>default view</span> of a
+  <code>Document</code> is given by the <code
+  title="">defaultView</code> attribute on the <code>Document</code>
+  object's <code>DocumentView</code> interface. <a
+  href="#refsDOM3VIEWS">[DOM3VIEWS]</a></p>
+
   <p class="note">The <code title="">document</code> attribute of an
   <code>AbstractView</code> object representing a <span>view</span>
-  gives the <code>Document</code> object of the view's <span>browsing
-  context</span>'s <span>active document</span>. <a
+  gives the view's corresponding <code>Document</code> object. <a
   href="#refsDOM2VIEWS">[DOM2VIEWS]</a></p>
 
   <p class="note">Events that use the <code>UIEvent</code> interface
@@ -37655,18 +37662,21 @@
   href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
 
   <p class="note">A typical Web browser has one obvious
-  <span>view</span> per <span>browsing context</span>: the browser's
-  window (screen media). If a page is printed, however, a second view
-  becomes evident, that of the print media. The two views always share
-  the same underlying <code>Document</code>, but they have a different
-  presentation of that document. A speech browser also establishes a
-  browsing context, one with a view in the speech media.</p>
+  <span>view</span> per <code>Document</code>: the browser's window
+  (screen media). This is typically the <span>default view</span>. If
+  a page is printed, however, a second view becomes evident, that of
+  the print media. The two views always share the same underlying
+  <code>Document</code> object, but they have a different presentation
+  of that object. A speech browser might have a different
+  <span>default view</span>, using the speech media.</p>
 
   <p class="note">A <code>Document</code> does not necessarily have a
   <span>browsing context</span> associated with it. In particular,
   data mining tools are likely to never instantiate browsing
   contexts.</p>
 
+  <hr>
+
   <p>A <span>browsing context</span> can have a <dfn>creator browsing
   context</dfn>, the <span>browsing context</span> that was
   responsible for its creation. Unless otherwise specified, a
@@ -37680,15 +37690,6 @@
   title="">A</var> was created is the <dfn>creator
   <code>Document</code></dfn>.</p>
 
-  <p>The main <span>view</span> through which a user primarily
-  interacts with a user agent is the <dfn>default view</dfn>.</p>
-
-  <p class="note">The <span>default view</span> of a
-  <code>Document</code> is given by the <code
-  title="">defaultView</code> attribute on the <code>Document</code>
-  object's <code>DocumentView</code> interface. <a
-  href="#refsDOM3VIEWS">[DOM3VIEWS]</a></p>
-
   <p>When a <span>browsing context</span> is first created, it must be
   created with a single <code>Document</code> in its session history,
   whose <span title="the document's address">address</span> is
@@ -37775,31 +37776,33 @@
   <h5>Navigating nested browsing contexts in the DOM</h5>
 
   <p>The <dfn title="dom-top"><code>top</code></dfn> DOM attribute on
-  the <code>Window</code> object of a <span>browsing context</span>
-  <var title="">b</var> must return the <code>Window</code> object of
-  its <span>top-level browsing context</span> (which would be its own
-  <code>Window</code> object if it was a <span>top-level browsing
-  context</span> itself).</p>
+  the <code>Window</code> object of a <code>Document</code> in a
+  <span>browsing context</span> <var title="">b</var> must return the
+  <code>WindowProxy</code> object of its <span>top-level browsing
+  context</span> (which would be its own <code>WindowProxy</code>
+  object if it was a <span>top-level browsing context</span>
+  itself).</p>
 
   <p>The <dfn title="dom-parent"><code>parent</code></dfn> DOM
-  attribute on the <code>Window</code> object of a <span>browsing
-  context</span> <var title="">b</var> must return the
-  <code>Window</code> object of the <span>parent browsing
-  context</span>, if there is one (i.e. if <var title="">b</var> is a
-  <span>child browsing context</span>), or the <code>Window</code>
-  object of the <span>browsing context</span> <var title="">b</var>
-  itself, otherwise (i.e. if it is a <span>top-level browsing
-  context</span>).</p>
+  attribute on the <code>Window</code> object of a
+  <code>Document</code> in a <span>browsing context</span> <var
+  title="">b</var> must return the <code>WindowProxy</code> object of
+  the <span>parent browsing context</span>, if there is one (i.e. if
+  <var title="">b</var> is a <span>child browsing context</span>), or
+  the <code>WindowProxy</code> object of the <span>browsing
+  context</span> <var title="">b</var> itself, otherwise (i.e. if it
+  is a <span>top-level browsing context</span>).</p>
 
   <p>The <dfn title="dom-frameElement"><code>frameElement</code></dfn>
-  DOM attribute on the <code>Window</code> object of a <span>browsing
-  context</span> <var title="">b</var>, on getting, must run the
-  following algorithm:</p>
+  DOM attribute on the <code>Window</code> object of a
+  <code>Document</code> <var title="">d</var>, on getting, must run
+  the following algorithm:</p>
 
   <ol>
 
-   <li><p>If <var title="">b</var> is not a <span>child browsing
-   context</span>, return null and abort these steps.</p></li>
+   <li><p>If <var title="">d</var> is not a <code>Document</code> in a
+   <span>child browsing context</span>, return null and abort these
+   steps.</p></li>
 
    <li><p>If the <span>parent browsing context</span>'s <span>active
    document</span> does not have the <span>same</span> <span>effective
@@ -37837,10 +37840,10 @@
 
   <p>The <dfn title="dom-opener"><code>opener</code></dfn> DOM
   attribute on the <code>Window</code> object must return the
-  <code>Window</code> object of the <span>browsing context</span> from
-  which the current browsing context was created (its <span>opener
-  browsing context</span>), if there is one and it is still
-  available.</p>
+  <code>WindowProxy</code> object of the <span>browsing context</span>
+  from which the current <span>browsing context</span> was created
+  (its <span>opener browsing context</span>), if there is one and it
+  is still available.</p>
 
 
 
@@ -38062,18 +38065,24 @@
 
 
 
+  <h3>The <code>WindowProxy</code> object</h3>
 
-  <h3>The default view</h3>
+  <p>As mentioned earlier, each <span>browsing context</span> has a
+  <dfn>WindowProxy</dfn> object. This object is unusual in that it
+  must proxy all operations to the <code>Window</code> object of the
+  <span>browsing context</span>'s <span>active document</span>. It is
+  thus indistinguishable from that <code>Window</code> object in every
+  way, except that it is not equal to it.</p>
 
-  <p>The <code>AbstractView</code> object of <span title="default
-  view">default views</span> must also implement the
-  <code>Window</code> and <code>EventTarget</code> interfaces.</p>
 
+
+  <h3>The <code>Window</code> object</h3>
+
   <pre class="idl">[<span title="dom-window-item">IndexGetter</span>, <span title="dom-window-namedItem">NameGetter</span>=OverrideBuiltins]
 interface <dfn>Window</dfn> {
   // the current browsing context
-  readonly attribute <span>Window</span> <span title="dom-window">window</span>;
-  readonly attribute <span>Window</span> <span title="dom-self">self</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-window">window</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-self">self</span>;
            attribute DOMString <span title="dom-name">name</span>;
   [PutForwards=href] readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
   readonly attribute <span>History</span> <span title="dom-history">history</span>;
@@ -38091,13 +38100,13 @@
   void <span title="dom-window-blur">blur</span>();
 
   // other browsing contexts
-  readonly attribute <span>Window</span> <span title="dom-frames">frames</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-frames">frames</span>;
   readonly attribute unsigned long <span title="dom-length">length</span>;
-  readonly attribute <span>Window</span> <span title="dom-top">top</span>;
-  [Replaceable] readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
-  readonly attribute <span>Window</span> <span title="dom-parent">parent</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-top">top</span>;
+  [Replaceable] readonly attribute <span>WindowProxy</span> <span title="dom-opener">opener</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-parent">parent</span>;
   readonly attribute <span>Element</span> <span title="dom-frameElement">frameElement</span>;
-  <span>Window</span> <span title="dom-open">open</span>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
+  <span>WindowProxy</span> <span title="dom-open">open</span>([Optional] in DOMString url, [Optional] in DOMString target, [Optional] in DOMString features, [Optional] in DOMString replace);
 
   // the user agent
   readonly attribute <span>Navigator</span> <span title="dom-navigator">navigator</span>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
@@ -38164,31 +38173,25 @@
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindowInternal.idl - DOM level 0
    -->
 
+  <p>The <code>Window</code> object must also implement the
+  <code>EventTarget</code> interface.</p>
+
   <p>The <dfn title="dom-window"><code>window</code></dfn>, <dfn
   title="dom-frames"><code>frames</code></dfn>, and <dfn
   title="dom-self"><code>self</code></dfn> DOM attributes must all
-  return the <code>Window</code> object itself.</p>
+  return the <code>Window</code> object's <span>browsing
+  context</span>'s <code>WindowProxy</code> object.</p>
 
-  <p>The <code>Window</code> object also provides the scope for <span title="concept-script">script</span>
-  execution. Each <code>Document</code> in a <span>browsing
-  context</span> has an associated <dfn>list of added properties</dfn>
-  that, when a document is <span title="active
-  document">active</span>, are available on the
-  <code>Document</code>'s <span>default view</span>'s
-  <code>Window</code> object. A <code>Document</code> object's
-  <span>list of added properties</span> must be empty when the
-  <code>Document</code> object is created.</p>
 
 
-
   <h4>Security</h4>
 
-  <p>User agents must raise a <code>SECURITY_ERR</code> exception whenever
-  any of the members of a <code>Window</code> object are accessed by
-  scripts whose <span>effective script origin</span> is not the same
-  as the <code>Window</code> object's <span>browsing context</span>'s
-  <span>active document</span>'s <span>effective script origin</span>,
-  with the following exceptions:</p>
+  <p>User agents must raise a <code>SECURITY_ERR</code> exception
+  whenever any of the members of a <code>Window</code> object are
+  accessed by scripts whose <span>effective script origin</span> is
+  not the same as the <code>Window</code> object's
+  <code>Document</code>'s <span>effective script origin</span>, with
+  the following exceptions:</p>
 
   <ul>
 
@@ -38282,10 +38285,12 @@
   <span title="concept-script">script</span> that invoked the method
   as the <span>source browsing context</span>.</p>
 
-  <p>The method must return the <code>Window</code> object of the
-  default view of the <span>browsing context</span> that was
-  navigated, or null if no browsing context was navigated.</p>
+  <p>The method must return the <code>WindowProxy</code> object of the
+  <span>browsing context</span> that was navigated, or null if no
+  browsing context was navigated.</p>
 
+  <hr>
+
   <p>The <dfn title="dom-name"><code>name</code></dfn> attribute of
   the <code>Window</code> object must, on getting, return the current
   name of the <span>browsing context</span>, and, on setting, set the
@@ -38294,6 +38299,8 @@
   <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 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 an
@@ -38313,25 +38320,23 @@
   <p>The <dfn title="dom-length"><code>length</code></dfn> DOM
   attribute on the <code>Window</code> interface must return the
   number of <span title="child browsing context">child browsing
-  contexts</span> of the <span title="active document">active</span>
-  <code>Document</code>.</p>
+  contexts</span> of the <code>Document</code>.</p>
 
   <p>The <span>indices of the supported indexed properties</span> on
   the <code>Window</code> object at any instant are the numbers in the
   range 0 .. <span><var title="">n</var>-1</span>, where <var
   title="">n</var> is the number of <span title="child browsing
-  context">child browsing contexts</span> of the <span title="active
-  document">active</span> <code>Document</code>. If <var
-  title="">n</var> is zero then there are no <span>supported indexed
-  properties</span>.</p>
+  context">child browsing contexts</span> of the
+  <code>Document</code>. If <var title="">n</var> is zero then there
+  are no <span>supported indexed properties</span>.</p>
 
   <p>When a <code>Window</code> object is <dfn
   title="dom-window-item">indexed to retrieve an indexed
   property</dfn> <var title="">index</var>, the value returned must be
   the <var title="">index</var>th <span>child browsing context</span>
-  of the <span title="active document">active</span>
-  <code>Document</code>, sorted in document order of the elements
-  nesting those browsing contexts.</p>
+  of the <code>Document</code>, sorted in the <span>tree order</span>
+  of the elements nesting those <span title="browsing
+  context">browsing contexts</span>.</p>
 
   <p>These properties are the <dfn>dynamic nested browsing context
   properties</dfn>.</p>
@@ -38340,11 +38345,15 @@
   <h4>Garbage collection and browsing contexts</h4>
 
   <p>A <span>browsing context</span> has a strong reference to each of
-  its <code>Document</code>s and <span title="view">views</span>, and
-  the user agent itself has a strong reference to its <span
+  its <code>Document</code>s and its <code>WindowProxt</code> object,
+  and the user agent itself has a strong reference to its <span
   title="top-level browsing context">top-level browsing
   contexts</span>.</p>
 
+  <p>A <code>Document</code> has a strong reference to each of its
+  <span title="view">views</span> and their <code>AbstractView</code>
+  objects.</p>
+
   <p>When a <span>browsing context</span> is to <dfn>discard a
   <code>Document</code></dfn>, that means that it is to lose the
   strong reference from the <code>Document</code>'s <span>browsing
@@ -38352,9 +38361,8 @@
 
   <p class="note">The <span>browsing context</span>'s <span>default
   view</span>'s <code>Window</code> object <span title="implied strong
-  reference">has a strong reference of its own</span> to the
-  <code>Document</code> object of the <span>browsing context</span>'s
-  <span>active document</span>.</p>
+  reference">has a strong reference of its own</span> to its
+  <code>Document</code> object.</p>
 
   <p>When <dfn>a <em><span>browsing context</span></em> is
   discarded</dfn>, the strong reference from the user agent itself to
@@ -38370,7 +38378,7 @@
   containing one or more <span title="top-level browsing
   context">top-level browsing contexts</span>). Other <span
   title="browsing context">browsing contexts</span> must be discarded
-  once their <code>Window</code> object is eligible for garbage
+  once their <code>WindowProxy</code> object is eligible for garbage
   collection.</p>
 
 
@@ -38419,10 +38427,10 @@
    <li>
 
     <p>If <var title="">elements</var> contains an <code>iframe</code>
-    element, then return the <code>Window</code> object of the
-    <span>default view</span> of the <span>nested browsing
-    context</span> represented by the first such <code>iframe</code>
-    element in <span>tree order</span>, and abort these steps.</p>
+    element, then return the <code>WindowProxy</code> object of the
+    <span>nested browsing context</span> represented by the first such
+    <code>iframe</code> element in <span>tree order</span>, and abort
+    these steps.</p>
 
    </li>
 
@@ -38777,8 +38785,7 @@
      <dd>The <span>origin</span> and <span>effective script
      origin</span> are equal to the <span>origin</span> and
      <span>effective script origin</span> of the <code>Document</code>
-     object that was the <span>active document</span> of the browsing context of the
-     <code>Window</code> object from which the
+     object of the <code>Window</code> object from which the
      <code>XMLHttpRequest</code> constructor was invoked. (That is,
      they track the <code>Document</code> to which the
      <code>XMLHttpRequest</code> object's <a
@@ -39260,24 +39267,6 @@
 
    </dd>
 
-   <dt>Membership in a <dfn>script group</dfn></dt>
-
-   <dd>
-
-    <p>A group of one or more scripts that are loaded in the same
-    context, which are always disabled as a group. Scripts in a script
-    group all have the same <span title="script's global
-    object">global object</span> and <span title="script's browsing
-    context">browsing context</span>.</p>
-
-    <p>A script group can be <i>frozen</i>. When a script group is
-    frozen, any code defined in that script group will throw an
-    exception when invoked. A frozen script group can be
-    <i>unfrozen</i>, allowing scripts in that script group to run
-    normally again.</p>
-
-   </dd>
-
   </dl>
 
 
@@ -39285,61 +39274,41 @@
   <h5>Calling scripts</h5>
 
   <p>When a user agent is to <dfn>jump to a code entry-point</dfn> for
-  a <span title="concept-script">script</span>, for example because
-  one <span title="concept-script">script</span> has called another,
-  or because the user agent is to invoke a callback defined in that
-  <span title="concept-script">script</span>, the user agent must run
-  the following steps:</p>
+  a <span title="concept-script">script</span>, for example to invoke
+  an event listener defined in that <span
+  title="concept-script">script</span>, the user agent must run the
+  following steps:</p>
 
   <ol>
 
-   <li>
+   <li><p>If the <span>script's global object</span> is a
+   <code>Window</code> object whose <code>Document</code> object is
+   not <span>fully active</span>, then abort these steps without doing
+   anything. The callback is not fired.</p>
 
-    <p>If executable code from a <span
-    title="concept-script">script</span> is making a call to a <span
-    title="concept-script">script</span> in the same <span>script
-    group</span>, then skip this step.</p>
+   <li><p>Set the <span>first script</span> to be the <span
+   title="concept-script">script</span> being invoked.</p></li>
 
-    <p>Otherwise, if <span title="concept-bc-noscript">scripting is
-    disabled</span> in the <span>script's browsing context</span>, or
-    if the script's <span>script group</span> is <i>frozen</i>, then
-    the user agent must throw an <code>UNAVAILABLE_SCRIPT_ERR</code>
-    exception and abort these steps.</p>
-
-   </li>
-
-   <li><p>If this algorithm was <em>not</em> invoked by one script
-   calling another, then set the <span>first script</span> to be the
-   <span title="concept-script">script</span> being invoked.</p></li>
-
    <li><p>Make the <span title="script execution environment">script
    execution environment</span> for the <span
    title="concept-script">script</span> execute the code for the given
    code entry-point.</p></li>
 
-   <li><p>If this algorithm was <em>not</em> invoked by one script
-   calling another, then set the <span>first script</span> back to
-   whatever it was when this algorithm started.</p></li>
+   <li><p>Set the <span>first script</span> back to whatever it was
+   when this algorithm started.</p></li>
 
   </ol>
 
-  <p class="note">In particular, this means that scripts in a
-  <i>frozen</i> <span>script group</span> can keep on executing so
-  long as they don't call code in another <span>script
-  group</span>. This is why a script doesn't immediately terminate
-  after calling <code title="dom-document-open">document.open()</code>
-  on its own <code>Document</code>.</p>
+  <p>This algorithm is not invoked by one script calling another.</p>
 
 
-
   <h5 id="creating-scripts">Creating scripts</h5>
 
   <p>When the specification says that a <span
   title="concept-script">script</span> is to be <dfn title="create a
   script">created</dfn>, given some script source, its scripting
   language, a global object, a browsing context, a character encoding,
-  a base URL, and a script group, the user agent must run the
-  following steps:</p>
+  and a base URL, the user agent must run the following steps:</p>
 
   <ol>
 
@@ -39359,9 +39328,6 @@
    character encoding</span>, and the <span>script's base URL</span>
    from the settings passed to this algorithm.</p></li>
 
-   <li><p>Add the <span title="concept-script">script</span> to the given <span>script
-   group</span>.</p></li>
-
    <li><p><span title="jump to a code entry-point">Jump</span> to the
    <span title="concept-script">script</span>'s <i>initial code
    entry-point</i>.</p></li>
@@ -39374,11 +39340,10 @@
   given some script source, its scripting language, and a browsing
   context, the user agent must <span>create a script</span>, using the
   given script source and scripting language, using a new empty object
-  as the global object, using the given browsing context as the
-  browsing context, and using a new script group as the script
-  group. The character encoding and base URL for the resulting <span
-  title="concept-script">script</span> are not important as no APIs
-  are exposed to the script.</p>
+  as the global object, and using the given browsing context as the
+  browsing context. The character encoding and base URL for the
+  resulting <span title="concept-script">script</span> are not
+  important as no APIs are exposed to the script.</p>
 
   <hr>
 
@@ -39404,8 +39369,7 @@
    <li><p>The browsing context is the <span>browsing context</span> of
    <var title="">document</var>.</p>
 
-   <li><p>The global object is the <code>Window</code> object of the
-   <span>default view</span> of the <span>browsing context</span> of
+   <li><p>The global object is the <code>Window</code> object of
    <var title="">document</var>.</p></li>
 
    <li><p>The character encoding is the <span title="document's
@@ -39417,9 +39381,6 @@
    URL</span> of <var title="">document</var>. (<a
    href="#sbu-not-copy">This is a reference, not a copy</a>.)</p></li>
 
-   <li><p>The script group is the <span>current script group</span> of
-   <var title="">document</var>.</p></li>
-
   </ol>
 
 
@@ -39864,8 +39825,7 @@
     of the handler, to the element's object, to the element's
     <span>form owner</span>, if it has one, to the element's
     <code>Document</code> object, to the <code>Window</code> object of
-    the <span>browsing context</span> of that
-    <code>Document</code>. Set the function's <code>this</code>
+    that <code>Document</code>. Set the function's <code>this</code>
     parameter to the <code>Element</code> object representing the
     element. Let this function be the only entry in the script's
     <span>list of code entry-points</span>.</p>
@@ -39884,9 +39844,7 @@
    <span>script's browsing context</span>, the <span>script's
    character encoding</span>, and the <span>script's base URL</span>
    from <span>the script settings determined from the node</span> on
-   which the attribute is being set, and add the <span
-   title="concept-script">script</span> to the <span>script
-   group</span> determined from that node as well.</p></li>
+   which the attribute is being set.</p></li>
 
    <li><p>Set the corresponding event handler attribute to the
    aforementioned function.</p></li>
@@ -40552,10 +40510,9 @@
 
     <p>The user agent must <span>fire a simple event</span> called
     <code title="event-beforeprint">beforeprint</code> at the
-    <code>Window</code> object of the browsing context of the
-    <code>Document</code> that is being printed, as well as any <span
-    title="nested browsing context">nested browsing contexts</span> in
-    it.</p>
+    <code>Window</code> object of the <code>Document</code> that is
+    being printed, as well as any <span title="nested browsing
+    context">nested browsing contexts</span> in it.</p>
 
     <p class="example">The <code
     title="event-beforeprint">beforeprint</code> event can be used
@@ -40582,10 +40539,9 @@
 
     <p>The user agent must <span>fire a simple event</span> called
     <code title="event-afterprint">afterprint</code> at the
-    <code>Window</code> object of the browsing context of the
-    <code>Document</code> that is being printed, as well as any <span
-    title="nested browsing context">nested browsing contexts</span> in
-    it.</p>
+    <code>Window</code> object of the <code>Document</code> that is
+    being printed, as well as any <span title="nested browsing
+    context">nested browsing contexts</span> in it.</p>
 
     <p class="example">The <code
     title="event-afterprint">afterprint</code> event can be used
@@ -40684,8 +40640,9 @@
     title="dom-showModalDialog">showModalDialog()</code> method was
     called. The new auxiliary browsing context has no name.</p>
 
-    <p class="note">This browsing context implements the
-    <code>WindowModal</code> interface.</p>
+    <p class="note">This <span>browsing context</span>'s
+    <code>Document</code>s' <code>Window</code> objects all implement
+    the <code>WindowModal</code> interface.</p>
 
    </li>
 
@@ -40742,8 +40699,10 @@
 
   </ol>
 
-  <p>Browsing contexts created by the above algorithm must implement
-  the <code>WindowModal</code> interface:</p>
+  <p>The <code>Window</code> objects of <code>Document</code>s hosted
+  by <span title="browsing context">browsing contexts</span> created
+  by the above algorithm must all implement the
+  <code>WindowModal</code> interface:</p>
 
   <p class="XXX">Really I want the Window object to just gain these
   attributes, as if they were on the Window prototype. That's the XXX
@@ -43005,13 +42964,12 @@
   <p>Objects implementing the <code>ApplicationCache</code> interface
   must also implement the <code>EventTarget</code> interface.</p>
 
-  <p>There is a one-to-one mapping from <code>Document</code> objects
-  to <code>ApplicationCache</code> objects. The <dfn
+  <p>There is a one-to-one mapping from <code>Window</code> objects to
+  <code>ApplicationCache</code> objects. The <dfn
   title="dom-applicationCache"><code>applicationCache</code></dfn>
   attribute on <code>Window</code> objects must return the
   <code>ApplicationCache</code> object associated with the
-  <span>active document</span> of the <code>Window</code>'s
-  <span>browsing context</span>.</p>
+  <code>Window</code> object.</p>
 
   <p>An <code>ApplicationCache</code> object might be associated with
   an <span>application cache</span>. When the <code>Document</code>
@@ -43249,18 +43207,19 @@
 
   <p><code>History</code> objects provide a representation of the
   pages in the session history of <span title="browsing
-  context">browsing contexts</span>. Each browsing context has a
-  distinct session history.</p>
+  context">browsing contexts</span>. Each <span>browsing
+  context</span>, including <span>nested browsing context</span>, has
+  a distinct session history.</p>
 
-  <p>Each <code>Document</code> object in a browsing context's session
-  history is associated with a unique instance of the
-  <code>History</code> object, although they all must model the same
-  underlying session history.</p>
+  <p>Each <code>Document</code> object in a <span>browsing
+  context</span>'s <span>session history</span> is associated with a
+  unique instance of the <code>History</code> object, although they
+  all must model the same underlying <span>session history</span>.</p>
 
   <p>The <dfn title="dom-history"><code>history</code></dfn> attribute
   of the <code>Window</code> interface must return the object
   implementing the <code>History</code> interface for that
-  <code>Window</code> object's <span>active document</span>.</p>
+  <code>Window</code> object's <code>Document</code>.</p>
 
   <p><code>History</code> objects represent their <span>browsing
   context</span>'s session history as a flat list of <span
@@ -43513,13 +43472,14 @@
 
      <dd><p><span>Queue a task</span> to fire a <dfn
      title="event-popstate"><code>popstate</code></dfn> event in no
-     namespace on the <code>Window</code> object of the <span>browsing
-     context</span>, using the <code>PopStateEvent</code> interface,
-     with the <code title="dom-PopStateEvent-state">state</code>
-     attribute set to the value of <var title="">state</var>. This
-     event must bubble but not be cancelable and has no default
-     action. The <span>task source</span> for this task is the
-     <span>DOM manipulation task source</span>.</p></dd>
+     namespace on the <code>Window</code> object of the
+     <code>Document</code>, using the <code>PopStateEvent</code>
+     interface, with the <code
+     title="dom-PopStateEvent-state">state</code> attribute set to the
+     value of <var title="">state</var>. This event must bubble but
+     not be cancelable and has no default action. The <span>task
+     source</span> for this task is the <span>DOM manipulation task
+     source</span>.</p></dd>
 
      <dt>Otherwise</dt>
 
@@ -43577,7 +43537,7 @@
   <p>The <dfn title="dom-location"><code>location</code></dfn>
   attribute of the <code>Window</code> interface must return the
   <code>Location</code> object for that <code>Window</code> object's
-  <span>active document</span>.</p>
+  <code>Document</code>.</p>
 
   <p><code>Location</code> objects provide a representation of <span
   title="the document's address">their document's address</span>, and
@@ -44506,18 +44466,6 @@
 
     <ol>
 
-     <li><p>Freeze the <span>active document</span>'s <span>current
-     script group</span>, as well as the <span>current script
-     group</span> of any <span title="active document">active
-     documents</span> in <span title="nested browsing context">nested
-     browsing contexts</span>.</p></li>
-
-     <li>The user agent must move any properties that have been added
-     to the browsing context's default view's <code>Window</code>
-     object to the <span>active document</span>'s
-     <code>Document</code>'s <span>list of added
-     properties</span>.</li>
-
      <li>If the browsing context is a <span>top-level browsing
      context</span> (and not an <span>auxiliary browsing
      context</span>), and the <span>origin</span> of the
@@ -44565,17 +44513,6 @@
 
      </li>
 
-     <li>The user agent must move any properties that have been added
-     to the <span>active document</span>'s <code>Document</code>'s
-     <span>list of added properties</span> to browsing context's
-     default view's <code>Window</code> object.</li>
-
-     <li><p>Unfreeze the <span>active document</span>'s <span>current
-     script group</span>, as well as the <span>current script
-     group</span> of any <span title="active document">active
-     documents</span> in <span title="nested browsing context">nested
-     browsing contexts</span>.</p></li>
-
     </ol>
 
    </li>
@@ -44629,8 +44566,7 @@
    which does not bubble but is cancelable.</p></li>
 
    <li><p>Dispatch <var title="">event</var> at the
-   <code>Window</code> object of the <code>Document</code>'s
-   <span>browsing context</span>.</p></li>
+   <code>Document</code>'s <code>Window</code> object.</p></li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</p></li>
@@ -44659,17 +44595,17 @@
    </li>
 
    <li><p><span>Fire a simple event</span> called <code
-   title="event-unload">unload</code> at the <code>Window</code>
-   object of the <code>Document</code>'s <span>browsing
-   context</span>.</p></li>
+   title="event-unload">unload</code> at the <code>Document</code>'s
+   <code>Window</code> object.</p></li>
 
    <li><p>If any event listeners were triggered by the previous step,
    then set <var title="">salvageable</var> to false.</p></li>
 
    <li><p>If there are any outstanding transactions that have
    callbacks that involve <span title="concept-script">scripts</span>
-   that are in the document's <span>current script group</span>, roll
-   them back (without invoking any of the callbacks) and set <var
+   whose <span title="script's global object">global object</span> is
+   the <code>Document</code>'s <code>Window</code> object, roll them
+   back (without invoking any of the callbacks) and set <var
    title="">salvageable</var> to false.</p>
 
    <li><p>If <var title="">salvageable</var> and <var
@@ -45021,10 +44957,9 @@
   <p>When the <code title="dom-localStorage">localStorage</code>
   attribute is accessed, the user agent must check to see if it has
   allocated a local storage area for the <span>origin</span> of the
-  <span>active document</span> of the <span>browsing context</span> of
-  the <code>Window</code> object on which the method was invoked. If
-  it has not, a new storage area for that <span>origin</span> must be
-  created.</p>
+  <code>Document</code> of the <code>Window</code> object on which the
+  method was invoked. If it has not, a new storage area for that
+  <span>origin</span> must be created.</p>
 
   <p>The user agent must then return the <code>Storage</code> object
   associated with that origin's local storage area. Each
@@ -45060,9 +44995,9 @@
   <p>When this happens, the user agent must dispatch an event with the
   name <code>storage</code>, with no namespace, which does not bubble
   but is cancelable, and which uses the <code>StorageEvent</code>
-  interface, at each <code>Window</code> object whose <span>active
-  document</span> has a <code>Storage</code> object that is
-  affected.</p>
+  interface, at each <code>Window</code> object whose
+  <code>Document</code> object both has a <code>Storage</code> object
+  that is affected, and is <span>fully active</span>.</p>
 
   <p>If the event is being fired due to an invocation of the
   <code title="dom-Storage-setItem">setItem()</code> or <code
@@ -45087,14 +45022,15 @@
   title="the document's address">the address of the document</span>
   whose <code>Storage</code> object was affected; its <code
   title="dom-StorageEvent-source">source</code> attribute set to the
-  <code>Window</code> object of the <span>browsing context</span> that
-  that document is in, if the two documents are in the same <span>unit
-  of related browsing contexts</span>, or null otherwise; and its
-  <code title="dom-StorageEvent-storageArea">storageArea</code>
-  attribute set to the <code>Storage</code> object from the
-  <code>Window</code> object of the target <code>Document</code> that
-  represents the same kind of <code>Storage</code> area as was
-  affected (i.e. session or local).</p>
+  that document's <span>browsing context</span>'s
+  <code>WindowProxy</code> object, if the two documents are in the
+  same <span>unit of related browsing contexts</span>, or null
+  otherwise; and its <code
+  title="dom-StorageEvent-storageArea">storageArea</code> attribute
+  set to the <code>Storage</code> object from the <code>Window</code>
+  object of the target <code>Document</code> that represents the same
+  kind of <code>Storage</code> area as was affected (i.e. session or
+  local).</p>
 
 
   <h6>Event definition</h6>
@@ -45104,10 +45040,10 @@
   readonly attribute DOMString <span title="dom-StorageEvent-oldValue">oldValue</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-newValue">newValue</span>;
   readonly attribute DOMString <span title="dom-StorageEvent-url">url</span>;
-  readonly attribute <span>Window</span> <span title="dom-StorageEvent-source">source</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-StorageEvent-source">source</span>;
   readonly attribute <span>Storage</span> <span title="dom-StorageEvent-storageArea">storageArea</span>;
-  void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
-  void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>Window</span> sourceArg, in <span>Storage</span> storageAreaArg);
+  void <span title="dom-StorageEvent-initStorageEvent">initStorageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>WindowProxy</span> sourceArg, in <span>Storage</span> storageAreaArg);
+  void <span title="dom-StorageEvent-initStorageEventNS">initStorageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in <span>WindowProxy</span> sourceArg, in <span>Storage</span> storageAreaArg);
 };</pre>
 
   <p>The <dfn
@@ -45135,8 +45071,8 @@
 
   <p>The <dfn
   title="dom-StorageEvent-source"><code>source</code></dfn> attribute
-  represents the <code>Window</code> object of the document whose key
-  changed.</p>
+  represents the <code>WindowProxy</code> object of the <span>browsing
+  context</span> of the document whose key changed.</p>
 
   <p>The <dfn
   title="dom-StorageEvent-storageArea"><code>storageArea</code></dfn>
@@ -45219,8 +45155,8 @@
 
   <p>The <code title="dom-opendatabase">openDatabase()</code> method
   must use and create databases from the <span>origin</span> of the
-  <span>active document</span> of the <span>browsing context</span> of
-  the <code>Window</code> object on which the method was invoked.</p>
+  <code>Document</code> of the <code>Window</code> object on which the
+  method was invoked.</p>
 
   <p>If the database version provided is not the empty string, and the
   database already exists but has a different version, or no version,
@@ -50343,10 +50279,10 @@
   readonly attribute any <span title="dom-MessageEvent-data">data</span>;
   readonly attribute DOMString <span title="dom-MessageEvent-origin">origin</span>;
   readonly attribute DOMString <span title="dom-MessageEvent-lastEventId">lastEventId</span>;
-  readonly attribute <span>Window</span> <span title="dom-MessageEvent-source">source</span>;
+  readonly attribute <span>WindowProxy</span> <span title="dom-MessageEvent-source">source</span>;
   readonly attribute <span>MessagePort</span> <span title="dom-MessageEvent-messagePort">messagePort</span>;
-  void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>MessagePort</span> messagePortArg);
-  void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>MessagePort</span> messagePortArg);
+  void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <span>WindowProxy</span> sourceArg, in <span>MessagePort</span> messagePortArg);
+  void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any dataArg, in DOMString originArg, in DOMString lastEventIdArg, in <span>WindowProxy</span> sourceArg, in <span>MessagePort</span> messagePortArg);
 };</pre>
 
   <p>The <dfn
@@ -50377,7 +50313,8 @@
   <p>The <dfn
   title="dom-MessageEvent-source"><code>source</code></dfn> attribute
   represents, in <span>cross-document messaging</span>, the
-  <code>Window</code> from which the message came.</p>
+  <code>WindowProxy</code> of the <span>browsing context</span> of the
+  <code>Window</code> object from which the message came.</p>
 
   <p>The <dfn
   title="dom-MessageEvent-messagePort"><code>messagePort</code></dfn>
@@ -52157,11 +52094,10 @@
 
     <p>If the <var title="">targetOrigin</var> argument has a value
     other than a single literal U+002A ASTERISK character ("*"), and
-    the <span>active document</span> of the <span>browsing
-    context</span> of the <code>Window</code> object on which the
-    method was invoked does not have the <span>same origin</span> as
-    <var title="">targetOrigin</var>, then abort these steps
-    silently.</p>
+    the <code>Document</code> of the <code>Window</code> object on
+    which the method was invoked does not have the <span>same
+    origin</span> as <var title="">targetOrigin</var>, then abort
+    these steps silently.</p>
 
    </li>
 
@@ -52178,12 +52114,9 @@
     origin">Unicode serialization</span> of the <span>origin</span> of
     the script that invoked the method, and the <code
     title="dom-MessageEvent-source">source</code> attribute must be
-    set to the <code>Window</code> object of the <span>default
-    view</span> of the <span>browsing context</span> for which the
-    <code>Document</code> object with which the script is associated
-    is the <span>active document</span><!--, if there is one, or null
-    otherwise-->.</p><!-- I think there always is one, because scripts
-    can't run and see a Window without that being the case. -->
+    set to the <span>script's global object</span>.</p> <!-- invariant:
+    the global scope is always a Window if the script can see this
+    method -->
 
    </li>
 
@@ -52194,7 +52127,6 @@
     method was invoked. The <span>task source</span> for this <span
     title="concept-task">task</span> is the <span>posted message task
     source</span>.</p>
-    <!-- XXX apply any body/window dispatch decisions here -->
 
    </li>
 
@@ -52271,11 +52203,10 @@
 
     <p>If the <var title="">targetOrigin</var> argument has a value
     other than a single literal U+002A ASTERISK character ("*"), and
-    the <span>active document</span> of the <span>browsing
-    context</span> of the <code>Window</code> object on which the
-    method was invoked does not have the <span>same origin</span> as
-    <var title="">targetOrigin</var>, then abort these steps
-    silently.</p>
+    the <code>Document</code> of the <code>Window</code> object on
+    which the method was invoked does not have the <span>same
+    origin</span> as <var title="">targetOrigin</var>, then abort
+    these steps silently.</p>
 
    </li>
 
@@ -52292,12 +52223,9 @@
     origin">Unicode serialization</span> of the <span>origin</span> of
     the script that invoked the method, and the <code
     title="dom-MessageEvent-source">source</code> attribute must be
-    set to the <code>Window</code> object of the <span>default
-    view</span> of the <span>browsing context</span> for which the
-    <code>Document</code> object with which the script is associated
-    is the <span>active document</span><!--, if there is one, or null
-    otherwise-->.</p><!-- I think there always is one, because scripts
-    can't run and see a Window without that being the case. -->
+    set to the <span>script's global object</span>.</p> <!-- invariant:
+    the global scope is always a Window if the script can see this
+    method -->
 
    </li>
 
@@ -52316,7 +52244,6 @@
     method was invoked. The <span>task source</span> for this <span
     title="concept-task">task</span> is the <span>posted message task
     source</span>.</p>
-    <!-- XXX apply any body/window dispatch decisions here -->
 
    </li>
 
@@ -52633,8 +52560,10 @@
   <span>event loop</span> must use it as one of its <span title="task
   source">task sources</span>.</p>
 
-  <p class="note">If the <span>script group</span> of the port's event
-  handlers is <i>frozen</i>, then the messages are lost.</p>
+  <p class="note">If the <code>Document</code> of the port's event
+  handlers' <span title="script's global object">global object</span>
+  is not <span>fully active</span>, then the messages are lost.</p>
+  <!-- because of the jump-to-entry-point algorithm first step -->
 
   <hr>
 
@@ -60100,14 +60029,14 @@
    <li>If the <code>Document</code> is in a <span>browsing
    context</span>, then <span>queue a task</span> to <span title="fire
    a load event">fire a <code title="event-load">load</code>
-   event</span> at the <span>browsing context</span>'s
-   <code>Window</code> object.</li>
+   event</span> at the <code>Document</code>'s <code>Window</code>
+   object.</li>
 
    <li>If the <code>Document</code> has a <span>pending state
    object</span>, then <span>queue a task</span> to fire a <code
    title="event-popstate">popstate</code> event in no namespace on the
-   <span>browsing context</span>'s <code>Window</code> object using
-   the <code>PopStateEvent</code> interface, with the <code
+   <code>Document</code>'s <code>Window</code> object using the
+   <code>PopStateEvent</code> interface, with the <code
    title="dom-PopStateEvent-state">state</code> attribute set to the
    current value of the <span>pending state object</span>. This event
    must bubble but not be cancelable and has no default action.</li>
@@ -61502,8 +61431,9 @@
   title="dom-windowtimers-setTimeout">setTimeout()</code> and <code
   title="dom-windowtimers-setInterval">setInterval()</code>, the clock
   upon which the timers are based must only tick while the
-  <span>script group</span> of their callbacks is not
-  <i>frozen</i>.</p>
+  <code>Document</code> of the <span title="script's global
+  object">global object</span> of their callbacks is <span>fully
+  active</span>.</p>
 
 
 




More information about the Commit-Watchers mailing list