spec/Overview.html 1.981 1791 Define 'URL' and 'valid URL'. Define 'scr

Define 'URL' and 'valid URL'. Define 'script document context'.
Introduce the term 'script browsing context' for the existing concept of
'browsing context associated with a script execution context' and use
that term where appropriate. Define origin of onfoo='' scripts. Fix xref
errors. Minor editorial fixes. (whatwg r1791) (changed by: Ian Hickson)

Diff: http://people.w3.org/mike/diffs/html5/spec/Overview.1.981.html
Cumulative diff: http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.980&r2=1.981&f=h
http://dev.w3.org/html5/spec/Overview.html

http://html5.org/tools/web-apps-tracker?from=1790&to=1791

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.980
retrieving revision 1.981
diff -u -d -r1.980 -r1.981
--- Overview.html	19 Jun 2008 09:27:35 -0000	1.980
+++ Overview.html	24 Jun 2008 00:21:08 -0000	1.981
@@ -59,7 +59,7 @@
     for HTML and XHTML</h2>
 
    <h2 class="no-num no-toc" id=editors0><!-- "W3C Working Draft" -->
-    Editor's Draft <!--ZZZ-->19 June 2008</h2>
+    Editor's Draft <!--ZZZ-->24 June 2008</h2>
 
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
@@ -207,7 +207,7 @@
 
   <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is
    the W3C working group responsible for this specification's progress along
-   the W3C Recommendation track. <!--ZZZ:--> This specification is the 19
+   the W3C Recommendation track. <!--ZZZ:--> This specification is the 24
    June 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--></p>
   <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST -->
   <!-- relationship to other work (required) -->
@@ -317,7 +317,10 @@
 
      <li><a href="#urls"><span class=secno>2.3 </span>URLs</a>
       <ul class=toc>
-       <li><a href="#interfaces"><span class=secno>2.3.1 </span>Interfaces
+       <li><a href="#terminology0"><span class=secno>2.3.1
+        </span>Terminology</a>
+
+       <li><a href="#interfaces"><span class=secno>2.3.2 </span>Interfaces
         for URI manipulation</a>
       </ul>
 
@@ -2785,6 +2788,40 @@
   <h3 id=urls><span class=secno>2.3 </span>URLs</h3>
   <!-- XXXURL -->
 
+  <p class=big-issue>The text in this section is not yet integrated with the
+   rest of the specification.
+
+  <h4 id=terminology0><span class=secno>2.3.1 </span>Terminology</h4>
+
+  <p>A <dfn id=url>URL</dfn> is a string used to identify a resource. A <a
+   href="#url">URL</a> is always associated with a <code>Document</code>,
+   either explicitly when the URL is created or defined; or through a DOM
+   node, in which case the associated <code>Document</code> is the node's
+   <code>Document</code>; or through a script, in which case the associated
+   <code>Document</code> is the script's <a href="#script4">script document
+   context</a>.
+
+  <p>A <a href="#url">URL</a> is a <dfn id=valid>valid URL</dfn> if at least
+   one of the following conditions holds:
+
+  <ul>
+   <li>
+    <p>The <a href="#url">URL</a> is a valid URI.
+
+   <li>
+    <p>The <a href="#url">URL</a> is a valid IRI and it has no query
+     component.
+
+   <li>
+    <p>The <a href="#url">URL</a> is a valid IRI and its query component
+     contains no unescaped non-ASCII characters.
+
+   <li>
+    <p>The <a href="#url">URL</a> is a valid IRI and the <a
+     href="#character1" title="document's character encoding">character
+     encoding</a> of the URL's <code>Document</code> is UTF-8.
+  </ul>
+
   <div class=big-issue>
    <p>This section will do the following:</p>
 
@@ -2889,7 +2926,7 @@
   </div>
   <!-- XXXURL change to URL -->
 
-  <h4 id=interfaces><span class=secno>2.3.1 </span>Interfaces for URI
+  <h4 id=interfaces><span class=secno>2.3.2 </span>Interfaces for URI
    manipulation</h4>
   <!-- XXXURL change to URL -->
 
@@ -3182,7 +3219,7 @@
 
   <h5 id=unsigned><span class=secno>2.4.3.1. </span>Unsigned integers</h5>
 
-  <p>A string is a <dfn id=valid>valid non-negative integer</dfn> if it
+  <p>A string is a <dfn id=valid0>valid non-negative integer</dfn> if it
    consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
    U+0039 DIGIT NINE (9).
 
@@ -3243,7 +3280,7 @@
 
   <h5 id=signed><span class=secno>2.4.3.2. </span>Signed integers</h5>
 
-  <p>A string is a <dfn id=valid0>valid integer</dfn> if it consists of one
+  <p>A string is a <dfn id=valid1>valid integer</dfn> if it consists of one
    of more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
    (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-") character.
 
@@ -3321,7 +3358,7 @@
 
   <h5 id=real-numbers><span class=secno>2.4.3.3. </span>Real numbers</h5>
 
-  <p>A string is a <dfn id=valid1>valid floating point number</dfn> if it
+  <p>A string is a <dfn id=valid2>valid floating point number</dfn> if it
    consists of one of more characters in the range U+0030 DIGIT ZERO (0) to
    U+0039 DIGIT NINE (9), optionally with a single U+002E FULL STOP (".")
    character somewhere (either before these numbers, in between two numbers,
@@ -3447,7 +3484,7 @@
    <code><a href="#progress">progress</a></code> and <code><a
    href="#meter">meter</a></code> elements.
 
-  <p>A <dfn id=valid2>valid denominator punctuation character</dfn> is one of
+  <p>A <dfn id=valid3>valid denominator punctuation character</dfn> is one of
    the characters from the table below. There is <dfn id=a-value
    title="values associated with denominator punctuation characters">a value
    associated with each denominator punctuation character</dfn>, as shown in
@@ -3525,7 +3562,7 @@
     href="#references">[UNICODE]</a>
 
    <li>If there are still further characters in the string, and the next
-    character in the string is a <a href="#valid2">valid denominator
+    character in the string is a <a href="#valid3">valid denominator
     punctuation character</a>, set <var title="">denominator</var> to that
     character.
 
@@ -3548,7 +3585,7 @@
     sub-algorithm in step 9.
 
    <li>If there are still further characters in the string, and the next
-    character in the string is a <a href="#valid2">valid denominator
+    character in the string is a <a href="#valid3">valid denominator
     punctuation character</a>, return nothing and abort these steps.
 
    <li>If the string contains any other characters in the range U+0030 DIGIT
@@ -3583,7 +3620,7 @@
    <li>Parse <var title="">string</var> according to the <a
     href="#rules1">rules for parsing floating point number values</a>, to
     obtain <var title="">number</var>. This step cannot fail (<var
-    title="">string</var> is guaranteed to be a <a href="#valid1">valid
+    title="">string</var> is guaranteed to be a <a href="#valid2">valid
     floating point number</a>).
 
    <li>Return <var title="">number</var>.
@@ -3592,15 +3629,15 @@
   <h5 id=percentages-and-dimensions><span class=secno>2.4.3.5.
    </span>Percentages and dimensions</h5>
 
-  <p class=big-issue><dfn id=valid3>valid positive non-zero integers</dfn>
+  <p class=big-issue><dfn id=valid4>valid positive non-zero integers</dfn>
    <dfn id=rules2>rules for parsing dimension values</dfn> (only used by
    height/width on img, embed, object &mdash; lengths in css pixels or
    percentages)
 
   <h5 id=lists><span class=secno>2.4.3.6. </span>Lists of integers</h5>
 
-  <p>A <dfn id=valid4>valid list of integers</dfn> is a number of <a
-   href="#valid0" title="valid integer">valid integers</a> separated by
+  <p>A <dfn id=valid5>valid list of integers</dfn> is a number of <a
+   href="#valid1" title="valid integer">valid integers</a> separated by
    U+002C COMMA characters, with no other characters (e.g. no <a
    href="#space" title="space character">space characters</a>). In addition,
    there might be restrictions on the number of integers that can be given,
@@ -3891,7 +3928,7 @@
 
   <h5 id=specific><span class=secno>2.4.4.1. </span>Specific moments in time</h5>
 
-  <p>A string is a <dfn id=valid5>valid datetime</dfn> if it has four digits
+  <p>A string is a <dfn id=valid6>valid datetime</dfn> if it has four digits
    (representing the year), a literal hyphen, two digits (representing the
    month), a literal hyphen, two digits (representing the day), optionally
    some spaces, either a literal T or a space, optionally some more spaces,
@@ -3924,7 +3961,7 @@
    U+002B PLUS SIGN, and the minus U+002D (same as the hyphen).
 
   <div class=example>
-   <p>The following are some examples of dates written as <a href="#valid5"
+   <p>The following are some examples of dates written as <a href="#valid6"
     title="valid datetime">valid datetimes</a>.</p>
 
    <dl>
@@ -3977,7 +4014,7 @@
    user agent must apply the following algorithm to the string. This will
    either return a time in UTC, with associated timezone information for
    round tripping or display purposes, or nothing, indicating the value is
-   not a <a href="#valid5">valid datetime</a>. If at any point the algorithm
+   not a <a href="#valid6">valid datetime</a>. If at any point the algorithm
    says that it "fails", this means that it returns nothing.
 
   <ol>
@@ -4589,7 +4626,7 @@
 
   <h4 id=time-offsets><span class=secno>2.4.5 </span>Time offsets</h4>
 
-  <p class=big-issue><dfn id=valid6>valid time offset</dfn>, <dfn
+  <p class=big-issue><dfn id=valid7>valid time offset</dfn>, <dfn
    id=rules4>rules for parsing time offsets</dfn>, <dfn id=time-offset>time
    offset serialization rules</dfn>; in the format "5d4h3m2s1ms" or "3m 9.2s"
    or "00:00:00.00" or similar.
@@ -4786,7 +4823,7 @@
 
   <h4 id=syntax-references><span class=secno>2.4.8 </span>References</h4>
 
-  <p>A <dfn id=valid7>valid hash-name reference</dfn> to an element of type
+  <p>A <dfn id=valid8>valid hash-name reference</dfn> to an element of type
    <var title="">type</var> is a string consisting of a U+0023 NUMBER SIGN
    (<code title="">#</code>) character followed by a string which exactly
    matches the value of the <code title="">name</code> attribute of an
@@ -4882,7 +4919,7 @@
    the attribute is absent, then the default value must be returned instead,
    or 0 if there is no default value. On setting, the given value must be
    converted to the shortest possible string representing the number as a <a
-   href="#valid0">valid integer</a> in base ten and then that string must be
+   href="#valid1">valid integer</a> in base ten and then that string must be
    used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is an <em>unsigned</em> integer type
@@ -4893,7 +4930,7 @@
    hand, it fails, or if the attribute is absent, the default value must be
    returned instead, or 0 if there is no default value. On setting, the given
    value must be converted to the shortest possible string representing the
-   number as a <a href="#valid">valid non-negative integer</a> in base ten
+   number as a <a href="#valid0">valid non-negative integer</a> in base ten
    and then that string must be used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is an unsigned integer type
@@ -4908,7 +4945,7 @@
    value. On setting, if the value is zero, the user agent must fire an
    <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given value must be
    converted to the shortest possible string representing the number as a <a
-   href="#valid">valid non-negative integer</a> in base ten and then that
+   href="#valid0">valid non-negative integer</a> in base ten and then that
    string must be used as the new content attribute value.
 
   <p>If a reflecting DOM attribute is a floating point number type
@@ -4933,7 +4970,7 @@
    other hand, it fails, or if the attribute is absent, the default value
    must be returned instead, or 0.0 if there is no default value. On setting,
    the given value must be converted to the shortest possible string
-   representing the number as a <a href="#valid1">valid floating point
+   representing the number as a <a href="#valid2">valid floating point
    number</a> in base ten and then that string must be used as the new
    content attribute value.
 
@@ -6264,7 +6301,7 @@
   <pre class=idl>interface <dfn id=htmldocument>HTMLDocument</dfn> {
   // <a href="#resource0">resource metadata management</a>
   [PutForwards=href] readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</a>;
-  readonly attribute DOMString <a href="#url" title=dom-document-URL>URL</a>;
+  readonly attribute DOMString <a href="#url0" title=dom-document-URL>URL</a>;
            attribute DOMString <a href="#domain" title=dom-document-domain>domain</a>;
   readonly attribute DOMString <a href="#referrer" title=dom-document-referrer>referrer</a>;
            attribute DOMString <a href="#cookie0" title=dom-document-cookie>cookie</a>;
@@ -6333,7 +6370,7 @@
   <h4 id=resource><span class=secno>3.2.3 </span><dfn id=resource0>Resource
    metadata management</dfn></h4>
 
-  <p>The <dfn id=url title=dom-document-URL><code>URL</code></dfn> attribute
+  <p>The <dfn id=url0 title=dom-document-URL><code>URL</code></dfn> attribute
    must return <span>the document's address</span><!--
   XXXDOCURL xref -->.
 
@@ -8636,7 +8673,7 @@
    the first are ignored.
 
   <p>The <dfn id=target title=attr-base-target><code>target</code></dfn>
-   attribute, if specified, must contain a <a href="#valid9">valid browsing
+   attribute, if specified, must contain a <a href="#valid10">valid browsing
    context name or keyword</a>. User agents use this name when <a
    href="#following0">following hyperlinks</a>.
 
@@ -9509,9 +9546,9 @@
      attribute must have a value consisting either of:
 
     <ul>
-     <li> just a <a href="#valid">valid non-negative integer</a>, or
+     <li> just a <a href="#valid0">valid non-negative integer</a>, or
 
-     <li> a <a href="#valid">valid non-negative integer</a>, followed by a
+     <li> a <a href="#valid0">valid non-negative integer</a>, followed by a
       U+003B SEMICOLON (<code title="">;</code>), followed by one or more <a
       href="#space" title="space character">space characters</a>, followed by
       either a U+0055 LATIN CAPITAL LETTER U or a U+0075 LATIN SMALL LETTER
@@ -11369,7 +11406,7 @@
    attribute is omitted, the list is an ascending list (1, 2, 3, ...).
 
   <p>The <dfn id=start0 title=attr-ol-start><code>start</code></dfn>
-   attribute, if present, must be a <a href="#valid0">valid integer</a>
+   attribute, if present, must be a <a href="#valid1">valid integer</a>
    giving the ordinal value of the first list item.
 
   <p>If the <code title=attr-ol-start><a href="#start0">start</a></code>
@@ -11554,7 +11591,7 @@
    element.
 
   <p>The <dfn id=value title=attr-li-value><code>value</code></dfn>
-   attribute, if present, must be a <a href="#valid0">valid integer</a>
+   attribute, if present, must be a <a href="#valid1">valid integer</a>
    giving the ordinal value of the list item.
 
   <p>If the <code title=attr-li-value><a href="#value">value</a></code>
@@ -13011,7 +13048,7 @@
   <p><strong>Author requirements</strong>: The <code
    title=attr-progress-max><a href="#max">max</a></code> and <code
    title=attr-progress-value><a href="#value1">value</a></code> attributes,
-   when present, must have values that are <a href="#valid1" title="valid
+   when present, must have values that are <a href="#valid2" title="valid
    floating point number">valid floating point numbers</a>. The <code
    title=attr-progress-max><a href="#max">max</a></code> attribute, if
    present, must have a value greater than zero. The <code
@@ -13226,7 +13263,7 @@
    title=attr-meter-max><a href="#max1">max</a></code>, and <code
    title=attr-meter-optimum><a href="#optimum">optimum</a></code> attributes
    are all optional. When present, they must have values that are <a
-   href="#valid1" title="valid floating point number">valid floating point
+   href="#valid2" title="valid floating point number">valid floating point
    numbers</a>, and their values must satisfy the following inequalities:
 
   <ul class=brief>
@@ -14489,14 +14526,14 @@
 
   <p>If present, the <code title=attr-mod-datetime><a
    href="#datetime1">datetime</a></code> attribute must be a <a
-   href="#valid5">valid datetime</a> value.
+   href="#valid6">valid datetime</a> value.
 
   <p>User agents must parse the <code title=attr-mod-datetime><a
    href="#datetime1">datetime</a></code> attribute according to the <a
    href="#datetime-parser">parse a string as a datetime value</a> algorithm.
    If that doesn't return a time, then the modification has no associated
    timestamp (the value is non-conforming; it is not a <a
-   href="#valid5">valid datetime</a>). Otherwise, the modification is marked
+   href="#valid6">valid datetime</a>). Otherwise, the modification is marked
    as having been made at the given datetime. User agents should use the
    associated timezone information to determine which timezone to present the
    given datetime in.
@@ -15509,7 +15546,7 @@
    will remain at the initial <code>about:blank</code><!-- XXX xref --> page.
 
   <p>The <dfn id=name1 title=attr-iframe-name><code>name</code></dfn>
-   attribute, if present, must be a <a href="#valid8">valid browsing context
+   attribute, if present, must be a <a href="#valid9">valid browsing context
    name</a>. When the browsing context is created, if the attribute is
    present, the <a href="#browsing2">browsing context name</a> must be set to
    the value of this attribute; otherwise, the <a href="#browsing2">browsing
@@ -16068,7 +16105,7 @@
    href="#type6">type</a></code> attributes must be present.
 
   <p>The <dfn id=name3 title=attr-object-name><code>name</code></dfn>
-   attribute, if present, must be a <a href="#valid8">valid browsing context
+   attribute, if present, must be a <a href="#valid9">valid browsing context
    name</a>.
 
   <p>When the element is created, and subsequently whenever the <code
@@ -17013,7 +17050,7 @@
    allows the author to specify the pixel ratio of anamorphic <a
    href="#media10" title="media resource">media resources</a> that do not
    self-describe their pixel ratio. The attribute value, if specified, must
-   be a <a href="#valid1">valid floating point number</a> giving the ratio of
+   be a <a href="#valid2">valid floating point number</a> giving the ratio of
    the correct rendered width of each pixel to the actual width of each pixel
    in the image (i.e., the multiple by which the video's intrinsic width is
    to be multiplied to obtain the rendered width that gives the correct
@@ -19399,7 +19436,7 @@
    to control the size of the coordinate space: <dfn id=width0
    title=attr-canvas-width><code>width</code></dfn> and <dfn id=height0
    title=attr-canvas-height><code>height</code></dfn>. These attributes, when
-   specified, must have values that are <a href="#valid" title="valid
+   specified, must have values that are <a href="#valid0" title="valid
    non-negative integer">valid non-negative integers</a>. The <a
    href="#rules">rules for parsing non-negative integers</a> must be used to
    obtain their numeric values. If an attribute is missing, or if parsing its
@@ -20826,9 +20863,8 @@
    href="#globalcompositeoperation"
    title=dom-context-2d-globalCompositeOperation>global composition
    operators</a>. (Transformations affect the path when the path is created,
-   not when it is painted, though the stroke <em><a
-   href="#style1">style</a></em> is still affected by the transformation
-   during painting.)
+   not when it is painted, though the stroke <em title="">style</em> is still
+   affected by the transformation during painting.)
 
   <p>Zero-length line segments must be pruned before stroking a path. Empty
    subpaths must be ignored.
@@ -22164,7 +22200,7 @@
    href="#rectangle" title=attr-area-shape-rect>rectangle</a> state.
 
   <p>The <dfn id=coords title=attr-area-coords><code>coords</code></dfn>
-   attribute must, if specified, contain a <a href="#valid4">valid list of
+   attribute must, if specified, contain a <a href="#valid5">valid list of
    integers</a>. This attribute gives the coordinates for the shape described
    by the <code title=attr-area-shape><a href="#shape">shape</a></code>
    attribute. The processing for this attribute is described as part of the
@@ -22294,7 +22330,7 @@
    <code><a href="#img">img</a></code> or <code><a
    href="#object">object</a></code> element. The <code
    title=attr-area-usemap>usemap</code> attribute, if specified, must be a <a
-   href="#valid7">valid hash-name reference</a> to a <code><a
+   href="#valid8">valid hash-name reference</a> to a <code><a
    href="#map">map</a></code> element.
 
   <p>If an <code><a href="#img">img</a></code> element or an <code><a
@@ -22616,7 +22652,7 @@
    give the dimensions of the visual content of the element (the width and
    height respectively, relative to the nominal direction of the output
    medium), in CSS pixels. The attributes, if specified, must have values
-   that are <a href="#valid3">valid positive non-zero integers</a>.
+   that are <a href="#valid4">valid positive non-zero integers</a>.
 
   <p>The specified dimensions given may differ from the dimensions specified
    in the resource itself, since the resource may have a resolution that
@@ -23029,7 +23065,7 @@
   <p>If the <code><a href="#colgroup">colgroup</a></code> element contains no
    <code><a href="#col">col</a></code> elements, then the element may have a
    <dfn id=span0 title=attr-colgroup-span><code>span</code></dfn> content
-   attribute specified, whose value must be a <a href="#valid">valid
+   attribute specified, whose value must be a <a href="#valid0">valid
    non-negative integer</a> greater than zero.
 
   <p>The <code><a href="#colgroup">colgroup</a></code> element and its <code
@@ -23083,7 +23119,7 @@
 
   <p>The element may have a <dfn id=span2
    title=attr-col-span><code>span</code></dfn> content attribute specified,
-   whose value must be a <a href="#valid">valid non-negative integer</a>
+   whose value must be a <a href="#valid0">valid non-negative integer</a>
    greater than zero.
 
   <p>The <code><a href="#col">col</a></code> element and its <code
@@ -23556,13 +23592,13 @@
   <p>The <code><a href="#td">td</a></code> and <code><a
    href="#th">th</a></code> elements may have a <dfn id=colspan
    title=attr-tdth-colspan><code>colspan</code></dfn> content attribute
-   specified, whose value must be a <a href="#valid">valid non-negative
+   specified, whose value must be a <a href="#valid0">valid non-negative
    integer</a> greater than zero.
 
   <p>The <code><a href="#td">td</a></code> and <code><a
    href="#th">th</a></code> elements may also have a <dfn id=rowspan
    title=attr-tdth-rowspan><code>rowspan</code></dfn> content attribute
-   specified, whose value must be a <a href="#valid">valid non-negative
+   specified, whose value must be a <a href="#valid0">valid non-negative
    integer</a>.
 
   <p>The <code><a href="#td">td</a></code> and <code><a
@@ -25002,7 +25038,7 @@
          agents must use all the child nodes of the <code><a
          href="#script1">script</a></code> element as the script to execute.</p>
       </dl>
-
+      <!-- SCRIPT EXEC -->
       <p>In any case, the user agent must execute the script according to the
        semantics defined by the language associated with <var><a
        href="#the-scripts">the script's type</a></var> (see the <a
@@ -25012,6 +25048,10 @@
        must be the <code><a href="#window">Window</a></code> object of that
        <a href="#browsing1">browsing context</a>.</p>
 
+      <p>The <a href="#script4">script document context</a> of the script
+       must be the <code>Document</code> object that owns the <code><a
+       href="#script1">script</a></code> element.</p>
+
       <p class=note>The element's attributes' values might have changed
        between when the element was inserted into the document and when the
        script has finished loading, as may its other attributes; similarly,
@@ -29791,12 +29831,12 @@
    name</dfn>. By default, a browsing context has no name (its name is not
    set).
 
-  <p>A <dfn id=valid8>valid browsing context name</dfn> is any string with at
+  <p>A <dfn id=valid9>valid browsing context name</dfn> is any string with at
    least one character that does not start with a U+005F LOW LINE character.
    (Names starting with an underscore are reserved for special keywords.)
 
-  <p>A <dfn id=valid9>valid browsing context name or keyword</dfn> is any
-   string that is either a <a href="#valid8">valid browsing context name</a>
+  <p>A <dfn id=valid10>valid browsing context name or keyword</dfn> is any
+   string that is either a <a href="#valid9">valid browsing context name</a>
    or that case-insensitively <!-- ASCII --> matches one of: <code
    title="">_blank</code>, <code title="">_self</code>, <code
    title="">_parent</code>, or <code title="">_top</code>.
@@ -30096,7 +30136,7 @@
 
   <p>The second argument, <var title="">target</var>, specifies the <a
    href="#browsing2" title="browsing context name">name</a> of the browsing
-   context that is to be navigated. It must be a <a href="#valid9">valid
+   context that is to be navigated. It must be a <a href="#valid10">valid
    browsing context name or keyword</a>. If fewer than two arguments are
    provided, then the <var title="">name</var> argument defaults to the value
    "<code>_blank</code>".
@@ -30139,15 +30179,8 @@
    href="#browsing1">browsing context</a> was just created as part of the <a
    href="#the-rules">the rules for choosing a browsing context given a
    browsing context name</a>. The navigation must be done with the <a
-   href="#browsing1">browsing context</a> corresponding to the <code><a
-   href="#window">Window</a></code> object that is the <a
-   href="#script2">script execution context</a> of the script that invoked
-   the method as the <a href="#source0">source browsing context</a>.
-
-  <p class=note>If the <a href="#script2">script execution context</a> of a
-   script isn't a <code><a href="#window">Window</a></code> object, then it
-   can't ever get to a <code><a href="#window">Window</a></code> object to
-   call this method.
+   href="#script3">script browsing context</a> of the script that invoked the
+   method as the <a href="#source0">source browsing context</a>.
 
   <p>The method must return the <code><a href="#window">Window</a></code>
    object of the default view of the <a href="#browsing1">browsing
@@ -30278,6 +30311,12 @@
      <dd>The owner is the <code>Document</code> to which the <code><a
       href="#script1">script</a></code> element belongs.
 
+     <dt>If a script is in an <a href="#event3" title="event handler content
+      attributes">event handler content attribute</a>
+
+     <dd>The owner is the <code>Document</code> to which the attribute node
+      belongs.
+
      <dt>If a script is a function or other code reference created by another
       script
 
@@ -30612,19 +30651,34 @@
     scripting features.
   </ul>
 
+  <p>When a script is created<!-- which is marked by SCRIPT EXEC in
+  this spec -->,
+   it is associated with a <a href="#script2">script execution context</a>, a
+   <a href="#script3">script browsing context</a>, and a <a
+   href="#script4">script document context</a>.</p>
+  <!-- SCRIPT EXEC -->
+
   <h4 id=script0><span class=secno>5.4.1 </span>Script execution contexts</h4>
 
   <p>The <dfn id=script2>script execution context</dfn> of a script is
-   defined when that script is created. It is typically a <code><a
-   href="#window">Window</a></code> object.
+   defined when that script is created. It is either a <code><a
+   href="#window">Window</a></code> object or an empty object.
+
+  <p>When the <a href="#script2">script execution context</a> of a script is
+   an empty object, it can't do anything that interacts with the environment.
+
+  <hr>
 
   <p>A <a href="#script2">script execution context</a> always has an
-   associated <a href="#browsing1">browsing context</a>. If the <a
-   href="#script2">script execution context</a> is a <code><a
-   href="#window">Window</a></code> object, then that object's <a
-   href="#browsing1">browsing context</a> is it. Otherwise, the <a
-   href="#script2">script execution context</a> is associated explicitly with
-   a <a href="#browsing1">browsing context</a> when it is created.
+   associated <a href="#browsing1">browsing context</a>, known as the <dfn
+   id=script3>script browsing context</dfn>. If the <a href="#script2">script
+   execution context</a> is a <code><a href="#window">Window</a></code>
+   object, then that object's <a href="#browsing1">browsing context</a> is
+   it. Otherwise, the <a href="#script2">script execution context</a> is
+   associated explicitly with a <a href="#browsing1">browsing context</a>
+   when it is created.
+
+  <hr>
 
   <p>It is said that <dfn id=scripting1>scripting is disabled</dfn> in a <a
    href="#script2">script execution context</a> when any of the following
@@ -30652,8 +30706,8 @@
   </ul>
 
   <p>A node is said to be <dfn id=without>without script</dfn> if either the
-   <code>Document</code> object of the node (the node itself, it is itself a
-   <code>Document</code> object) does not have an associated <a
+   <code>Document</code> object of the node (the node itself, if it is itself
+   a <code>Document</code> object) does not have an associated <a
    href="#browsing1">browsing context</a>, or <a href="#scripting1">scripting
    is disabled</a> in that <a href="#browsing1">browsing context</a>.
 
@@ -30673,9 +30727,19 @@
    will disable any event handler attributes, event listeners, timeouts, etc,
    that were set by scripts in the document.
 
+  <hr>
+
+  <p>Every script whose <a href="#script2">script execution context</a> is a
+   <code><a href="#window">Window</a></code> object is also associated with a
+   <code>Document</code> object, known as its <dfn id=script4>script document
+   context</dfn>. It is used to resolve URLs. The document is assigned when
+   the script is created, as with the <a href="#script3">script browsing
+   context</a>.
+
   <h4 id=security4><span class=secno>5.4.2 </span>Security exceptions</h4>
 
-  <p class=big-issue>Define <dfn id=security9>security exception</dfn>.
+  <p class=big-issue>Define <dfn id=security9>security exception</dfn>.</p>
+  <!-- SCRIPT EXEC -->
 
   <h4 id=javascript-protocol><span class=secno>5.4.3 </span><dfn
    id=the-javascript title="javascript protocol">The <code
@@ -30701,7 +30765,9 @@
    href="#same-origin">same origin</a> as the script given by that URI, the
    <a href="#script2">script execution context</a> must be the <code><a
    href="#window">Window</a></code> object of the <a
-   href="#browsing1">browsing context</a> being navigated.</p>
+   href="#browsing1">browsing context</a> being navigated, and the <a
+   href="#script4">script document context</a> must be that <a
+   href="#active">active document</a>.</p>
   <!-- XXXURL JSURL issue -->
 
   <p>When a browsing context is <a href="#navigate"
@@ -30710,8 +30776,7 @@
    href="#origin0">origin</a> that is <em>not</em> the <a href="#same-origin"
    title="same origin">same</a> as that of the script given by the URI, the
    <a href="#script2">script execution context</a> must be an empty object,
-   and the <a href="#script2">script execution context</a>'s associated <a
-   href="#browsing1">browsing context</a> must be the <a
+   and the <a href="#script3">script browsing context</a> must be the <a
    href="#browsing1">browsing context</a> being <a href="#navigate"
    title=navigate>navigated</a>.</p>
   <!-- XXXURL JSURL issue -->
@@ -30801,7 +30866,8 @@
   <p><dfn id=event3>Event handler content attributes</dfn>, when specified,
    must contain valid ECMAScript code matching the ECMAScript <code
    title="">FunctionBody</code> production. <a
-   href="#references">[ECMA262]</a>
+   href="#references">[ECMA262]</a></p>
+  <!-- SCRIPT EXEC -->
 
   <p>When an event handler content attribute is set, its new value must be
    interpreted as the body of an anonymous function with a single argument
@@ -30824,7 +30890,9 @@
 
   <p>The <a href="#script2">script execution context</a> of the event handler
    must be the <code><a href="#window">Window</a></code> object at the end of
-   the scope chain.
+   the scope chain. The <a href="#script4">script document context</a> of the
+   event handler must be the <code>Document</code> object that owns the event
+   handler content attribute that was set.
 
   <p class=big-issue>How do we allow non-JS event handlers?
 
@@ -31506,15 +31574,9 @@
    <li>
     <p><a href="#navigate">Navigate</a> the new browsing context to <var
      title="">url</var>, with <a href="#replacement">replacement enabled</a>,
-     and with the <a href="#browsing1">browsing context</a> of the <code><a
-     href="#window">Window</a></code> object that is the <a
-     href="#script2">script execution context</a> of the script that invoked
-     the method as the <a href="#source0">source browsing context</a>.</p>
-
-    <p class=note>If the <a href="#script2">script execution context</a> of a
-     script isn't a <code><a href="#window">Window</a></code> object, then it
-     can't ever get to a <code><a href="#window">Window</a></code> object to
-     call this method.</p>
+     and with the <a href="#script3">script browsing context</a> of the
+     script that invoked the method as the <a href="#source0">source browsing
+     context</a>.</p>
 
    <li>
     <p>Wait for the browsing context to be closed. (The user agent must allow
@@ -31609,22 +31671,19 @@
    method, when invoked, must cause the user agent to show a notification.
 
   <p id=sandboxNotifications>If the method was invoked from a script whose <a
-   href="#script2">script execution context</a>'s associated <a
-   href="#browsing1">browsing context</a> has the <a
+   href="#script3">script browsing context</a> has the <a
    href="#sandboxed1">sandboxed annoyances browsing context flag</a> set,
    then the notification must be shown within that <a
    href="#browsing1">browsing context</a>. The notification is said to be a
    <dfn id=sandboxed5>sandboxed notification</dfn>.
 
   <p>Otherwise, if the <a href="#origin0">origin</a> of the <a
-   href="#browsing1">browsing context</a> associated with the <a
-   href="#script2">script execution context</a> of the script that invoked
-   the method is <em>not</em> flagged as being a <a href="#trusted">trusted
+   href="#script3">script browsing context</a> of the script that invoked the
+   method is <em>not</em> flagged as being a <a href="#trusted">trusted
    notification source</a>, then the notification should be rendered within
    the <a href="#top-level">top-level browsing context</a> of the <a
-   href="#browsing1">browsing context</a> associated with the <a
-   href="#script2">script execution context</a> of the script that invoked
-   the method. The notification is said to be a <dfn id=normal>normal
+   href="#script3">script browsing context</a> of the script that invoked the
+   method. The notification is said to be a <dfn id=normal>normal
    notification</dfn>. User agents should provide a way to set the origin's
    <a href="#trusted">trusted notification source</a> flag from the
    notification, so that the user can benefit from notifications even when
@@ -31668,16 +31727,14 @@
   <p>When a <a href="#normal">normal notification</a> (but not a <a
    href="#sandboxed5">sandboxed notification</a>) is shown, the user agent
    may bring the user's attention to the <a href="#top-level">top-level
-   browsing context</a> of the <a href="#browsing1">browsing context</a>
-   associated with the <a href="#script2">script execution context</a> of the
-   script that invoked the method, if that would be useful; but user agents
-   should not use system-wide notification mechanisms to do so.
+   browsing context</a> of the <a href="#script3">script browsing context</a>
+   of the script that invoked the method, if that would be useful; but user
+   agents should not use system-wide notification mechanisms to do so.
 
   <p>When a <a href="#trusted0">trusted notification</a> is shown, the user
    agent should bring the user's attention to the notification and the <a
-   href="#browsing1">browsing context</a> associated with the <a
-   href="#script2">script execution context</a> of the script that invoked
-   the method, as per the platform conventions for attracting the user's
+   href="#script3">script browsing context</a> of the script that invoked the
+   method, as per the platform conventions for attracting the user's
    attention to applications.
 
   <div class=example>
@@ -31703,8 +31760,7 @@
     title=meta-application-name>application name</a>, if available, or else
     the <a href="#document.title" title=dom-document-title>document
     title</a>, of the <a href="#active">active document</a> of the <a
-    href="#browsing1">browsing context</a> associated with the <a
-    href="#script2">script execution context</a> of the script that invoked
+    href="#script3">script browsing context</a> of the script that invoked
     the method.
 
    <li>An icon chosen from the <a href="#links1" title="external resource
@@ -31744,8 +31800,7 @@
   <p>User agents should support user interaction with notifications, if and
    as appropriate given the platform conventions. If a user activates a
    notification, and the <var title="">onclick</var> callback argument was
-   present and is not null, then the <a href="#browsing1">browsing
-   context</a> associated with the <a href="#script2">script execution
+   present and is not null, then the <a href="#script3">script browsing
    context</a> of the function given by <var title="">onclick</var> should be
    brought to the user's attention, and the <var title="">onclick</var>
    callback should then be invoked.
@@ -34011,15 +34066,8 @@
   <p>Navigation for the <code title=dom-location-assign><a
    href="#assign">assign()</a></code> and <code title=dom-location-replace><a
    href="#replace">replace()</a></code> methods must be done with the <a
-   href="#browsing1">browsing context</a> of the <code><a
-   href="#window">Window</a></code> object that is the <a
-   href="#script2">script execution context</a> of the script that invoked
-   the method as the <a href="#source0">source browsing context</a>.
-
-  <p class=note>If the <a href="#script2">script execution context</a> of a
-   script isn't a <code><a href="#window">Window</a></code> object, then it
-   can't ever get to a <code><a href="#location2">Location</a></code> object
-   to call these methods.</p>
+   href="#script3">script browsing context</a> of the script that invoked the
+   method as the <a href="#source0">source browsing context</a>.</p>
   <!-- XXXURL algorithms -->
 
   <p>Relative <var title="">url</var> arguments for <code
@@ -36100,7 +36148,7 @@
 
   <p>The <dfn id=target3
    title=attr-hyperlink-target><code>target</code></dfn> attribute, if
-   present, must be a <a href="#valid9">valid browsing context name or
+   present, must be a <a href="#valid10">valid browsing context name or
    keyword</a>. User agents use this name when <a
    href="#following0">following hyperlinks</a>.</p>
   <!-- XXXURL change to URL -->
@@ -36957,7 +37005,7 @@
    href="#unordered">unordered set of unique space-separated tokens</a>. The
    values must all be either <code title=attr-link-sizes-any><a
    href="#any">any</a></code> or a value that consists of two <a
-   href="#valid" title="valid non-negative integer">valid non-negative
+   href="#valid0" title="valid non-negative integer">valid non-negative
    integers</a> that do not have a leading U+0030 DIGIT ZERO (0) character
    and that are separated by a single U+0078 LATIN SMALL LETTER X character.
 
@@ -37732,7 +37780,7 @@
 
   <p>The <code title=attr-tabindex><a href="#tabindex">tabindex</a></code>
    attribute, if specified, must have a value that is a <a
-   href="#valid0">valid integer</a>.
+   href="#valid1">valid integer</a>.
 
   <p>If the attribute is specified, it must be parsed using the <a
    href="#rules0">rules for parsing integers</a>. The attribute's values have

Received on Tuesday, 24 June 2008 00:24:16 UTC