[html5] r1804 - [] (0) More URLification (<canvas>, <script>, <event-source>).

whatwg at whatwg.org whatwg at whatwg.org
Wed Jun 25 15:08:08 PDT 2008


Author: ianh
Date: 2008-06-25 15:08:08 -0700 (Wed, 25 Jun 2008)
New Revision: 1804

Modified:
   index
   source
Log:
[] (0) More URLification (<canvas>, <script>, <event-source>).

Modified: index
===================================================================
--- index	2008-06-25 20:41:58 UTC (rev 1803)
+++ index	2008-06-25 22:08:08 UTC (rev 1804)
@@ -19615,28 +19615,24 @@
    occur if a method was called with the wrong number of arguments).
 
   <p class=note>A future version of this specification will probably define a
-   <code>3d</code> context (probably based on the OpenGL ES API).</p>
-  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
-  <!-- XXXURL data: URIs? -->
+   <code>3d</code> context (probably based on the OpenGL ES API).
 
   <p>The <dfn id=todataurl
    title=dom-canvas-toDataURL><code>toDataURL()</code></dfn> method must,
-   when called with no arguments, return a <code title="">data:</code> URI
+   when called with no arguments, return a <code title="">data:</code> URL
    containing a representation of the image as a PNG file. <a
-   href="#refsPNG">[PNG]</a>.</p>
-  <!-- XXXURL data: URIs? -->
+   href="#refsPNG">[PNG]</a>.
 
   <p>If the canvas has no pixels (i.e. either its horizontal dimension or its
    vertical dimension is zero) then the method must return the string "<code
    title="">data:,</code>". (This is the shortest <code title="">data:</code>
-   URI; it represents the empty string in a <code title="">text/plain</code>
-   resource.)</p>
-  <!-- XXXURL data: URIs? -->
+   URL; it represents the empty string in a <code title="">text/plain</code>
+   resource.)
 
   <p>The <dfn id=todataurl0
    title=dom-canvas-toDataURL-type><code>toDataURL(<var
    title="">type</var>)</code></dfn> method (when called with one <em>or
-   more</em> arguments) must return a <code title="">data:</code> URI
+   more</em> arguments) must return a <code title="">data:</code> URL
    containing a representation of the image in the format given by <var
    title="">type</var>. The possible values are MIME types with no
    parameters, for example <code>image/png</code>, <code>image/jpeg</code>,
@@ -19645,12 +19641,11 @@
 
   <p>Only support for <code>image/png</code> is required. User agents may
    support other types. If the user agent does not support the requested
-   type, it must return the image using the PNG format.</p>
-  <!-- XXXURL data: URIs? -->
+   type, it must return the image using the PNG format.
 
   <p>User agents must convert the provided type to lower case before
    establishing if they support that type and before creating the <code
-   title="">data:</code> URI.</p>
+   title="">data:</code> URL.</p>
   <!-- XXX define "convert to lower
   case" -->
 
@@ -24780,11 +24775,11 @@
 
   <p>The <dfn id=src9 title=attr-script-src><code>src</code></dfn> attribute,
    if specified, gives the address of the external script resource to use.
-   The value of the attribute must be a <a href="#valid">valid URL</a> to a
-   script resource of the type given by the <code title=attr-script-type><a
-   href="#type11">type</a></code> attribute, if the attribute is present, or
-   of the type "<code title="">text/javascript</code>", if the attribute is
-   absent.
+   The value of the attribute must be a <a href="#valid">valid URL</a>
+   identifying a script resource of the type given by the <code
+   title=attr-script-type><a href="#type11">type</a></code> attribute, if the
+   attribute is present, or of the type "<code
+   title="">text/javascript</code>", if the attribute is absent.
 
   <p>The <dfn id=charset2
    title=attr-script-charset><code>charset</code></dfn> attribute gives the
@@ -25418,47 +25413,79 @@
 
   <p>The <dfn id=src11 title=attr-event-source-src><code>src</code></dfn>
    attribute, if specified, must give a <a href="#valid">valid URL</a>
-   pointing to a resource that uses the <code>text/event-stream</code>
-   format.</p>
-  <!-- XXXURL refer to new algorithms -->
+   identifying a resource that uses the <code>text/event-stream</code>
+   format.
 
-  <p>When the element is inserted into the document, if it has the <code
+  <p>When an <code><a href="#event-source">event-source</a></code> element
+   with a <code title=attr-event-source-src><a href="#src11">src</a></code>
+   attribute specified is inserted into the document<!-- XXX xref -->, and
+   when an <code><a href="#event-source">event-source</a></code> element that
+   is already in the document<!--XXX xref--> has a <code
    title=attr-event-source-src><a href="#src11">src</a></code> attribute
-   specified, the user agent must act as if the <code
-   title=dom-remoteEventTarget-addEventSource><a
-   href="#addeventsource">addEventSource()</a></code> method on the <code><a
-   href="#event-source">event-source</a></code> element had been invoked with
-   the URI resulting from resolving the <code title=attr-event-source-src><a
-   href="#src11">src</a></code> attribute's value to an absolute URI.</p>
-  <!-- XXXURL refer to new algorithms -->
+   added, the user agent must run the <a href="#add-declared">add declared
+   event source</a> algorithm.
 
-  <p>While the element is in a document, if its <code
+  <p>While an <code><a href="#event-source">event-source</a></code> element
+   is in a document<!--
+  XXX xref -->, if its <code
    title=attr-event-source-src><a href="#src11">src</a></code> attribute is
-   mutated, the user agent must act as if first the <code
-   title=dom-remoteEventTarget-removeEventSource><a
-   href="#removeeventsource">removeEventSource()</a></code> method on the
-   <code><a href="#event-source">event-source</a></code> element had been
-   invoked with the URI resulting from resolving the old value of the
-   attribute to an absolute URI, and then as if the <code
-   title=dom-remoteEventTarget-addEventSource><a
-   href="#addeventsource">addEventSource()</a></code> method on the element
-   had been invoked with the URI resulting from resolving the <em>new</em>
-   value of the <code title=attr-event-source-src><a
-   href="#src11">src</a></code> attribute to an absolute URI.</p>
-  <!-- XXXURL refer to new algorithms -->
+   mutated, the user agent must must run the <a href="#remove1">remove
+   declared event source</a> algorithm followed by the <a
+   href="#add-declared">add declared event source</a> algorithm.
 
-  <p>When the element is removed from the document, if it has the <code
+  <p>When an <code><a href="#event-source">event-source</a></code> element
+   with a <code title=attr-event-source-src><a href="#src11">src</a></code>
+   attribute specified is removed from a document<!-- XXX xref -->, and when
+   an <code><a href="#event-source">event-source</a></code> element that is
+   in a document<!--XXX
+  xref--> with a <code title=attr-event-source-src><a
+   href="#src11">src</a></code> attribute specified has its <code
    title=attr-event-source-src><a href="#src11">src</a></code> attribute
-   specified, or, when the <code title=attr-event-source-src><a
-   href="#src11">src</a></code> attribute is about to be removed, the user
-   agent must act as if the <code
-   title=dom-remoteEventTarget-removeEventSource><a
-   href="#removeeventsource">removeEventSource()</a></code> method on the
-   <code><a href="#event-source">event-source</a></code> element had been
-   invoked with the URI resulting from resolving the <code
-   title=attr-event-source-src><a href="#src11">src</a></code> attribute's
-   value to an absolute URI.
+   removed, the user agent must run the <a href="#remove1">remove declared
+   event source</a> algorithm.
 
+  <p>When it is created, an <code><a
+   href="#event-source">event-source</a></code> element must have its
+   <i>current declared event source</i> set to "undefined".
+
+  <p>The <dfn id=add-declared>add declared event source</dfn> algorithm is as
+   follows:
+
+  <ol>
+   <li><a href="#resolve" title="resolve a url">Resolve</a> the <a
+    href="#url">URL</a> specified by the <code><a
+    href="#event-source">event-source</a></code> element's <code
+    title=attr-event-source-src><a href="#src11">src</a></code> attribute.
+
+   <li>If that fails, then set the element's <i>current declared event
+    source</i> to "undefined" and abort these steps.
+
+   <li>Otherwise, act as if the <code
+    title=dom-remoteEventTarget-addEventSource><a
+    href="#addeventsource">addEventSource()</a></code> method on the <code><a
+    href="#event-source">event-source</a></code> element had been invoked
+    with the resulting <a href="#absolute">absolute URL</a>.
+
+   <li>Let the element's <i>current declared event source</i> be that <a
+    href="#absolute">absolute URL</a>.
+  </ol>
+
+  <p>The <dfn id=remove1>remove declared event source</dfn> algorithm is as
+   follows:
+
+  <ol>
+   <li>If the element's <i>current declared event source</i> is "undefined",
+    abort these steps.
+
+   <li>Otherwise, act as if the <code
+    title=dom-remoteEventTarget-removeEventSource><a
+    href="#removeeventsource">removeEventSource()</a></code> method on the
+    <code><a href="#event-source">event-source</a></code> element had been
+    invoked with the element's <i>current declared event source</i>.
+
+   <li>Let the element's <i>current declared event source</i> be "undefined".
+  </ol>
+
   <p>There can be more than one <code><a
    href="#event-source">event-source</a></code> element per document, but
    authors should take care to avoid opening multiple connections to the same
@@ -25469,7 +25496,8 @@
 
   <p>The <dfn id=src12 title=dom-event-source-src><code>src</code></dfn> DOM
    attribute must <a href="#reflect">reflect</a> the content attribute of the
-   same name.
+   same name.</p>
+  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
 
   <h3 id=interactive-elements><span class=secno>4.11 </span>Interactive
    elements</h3>
@@ -33399,7 +33427,7 @@
   readonly attribute unsigned long <a href="#length8" title=dom-appcache-length>length</a>;
   DOMString <a href="#itemindex4" title=dom-appcache-item>item</a>(in unsigned long index);
   void <a href="#adduri" title=dom-appcache-add>add</a>(in DOMString uri);
-  void <a href="#remove1" title=dom-appcache-remove>remove</a>(in DOMString uri);
+  void <a href="#remove2" title=dom-appcache-remove>remove</a>(in DOMString uri);
 
   // events
            attribute <span>EventListener</span> <a href="#onchecking" title=handler-appcache-onchecking>onchecking</a>;
@@ -33603,7 +33631,7 @@
    implement.</p>
   <!-- XXXURL algorithms -->
 
-  <p>The <dfn id=remove1 title=dom-appcache-remove><code>remove(<var
+  <p>The <dfn id=remove2 title=dom-appcache-remove><code>remove(<var
    title="">uri</var>)</code></dfn> method must remove the <a
    href="#dynamic3" title=concept-appcache-dynamic>dynamic entry</a>
    categorization of any entry with the address <var title="">uri</var> in
@@ -39852,7 +39880,7 @@
 
   <pre class=idl>interface <dfn id=undomanager>UndoManager</dfn> {
   unsigned long <a href="#adddata" title=dom-UndoManager-add>add</a>(in DOMObject data, in DOMString title);
-  [XXX] void <a href="#remove2" title=dom-UndoManager-remove>remove</a>(in unsigned long index); <!-- XXX [[Delete]] DOMB -->
+  [XXX] void <a href="#remove3" title=dom-UndoManager-remove>remove</a>(in unsigned long index); <!-- XXX [[Delete]] DOMB -->
   void <a href="#clearundo" title=dom-UndoManager-clearUndo>clearUndo</a>();
   void <a href="#clearredo" title=dom-UndoManager-clearRedo>clearRedo</a>();
   [IndexGetter] DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index);
@@ -39940,7 +39968,7 @@
    expire server-held state when the server limitations come into play.</p>
   <!-- XXX note on expiring undo in case server can only do one level undo -->
 
-  <p>The <dfn id=remove2 title=dom-UndoManager-remove><code>remove(<var
+  <p>The <dfn id=remove3 title=dom-UndoManager-remove><code>remove(<var
    title="">index</var>)</code></dfn> method must remove the <a
    href="#undo-object">undo object</a> entry with the specified <var
    title="">index</var>. If the index is less than zero or greater than or

Modified: source
===================================================================
--- source	2008-06-25 20:41:58 UTC (rev 1803)
+++ source	2008-06-25 22:08:08 UTC (rev 1804)
@@ -17105,41 +17105,36 @@
   define a <code>3d</code> context (probably based on the OpenGL ES
   API).</p>
 
-  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
-
-  <!-- XXXURL data: URIs? -->
   <p>The <dfn
   title="dom-canvas-toDataURL"><code>toDataURL()</code></dfn> method
   must, when called with no arguments, return a <code
-  title="">data:</code> URI containing a representation of the image
+  title="">data:</code> URL containing a representation of the image
   as a PNG file. <a href="#refsPNG">[PNG]</a>.</p>
 
-  <!-- XXXURL data: URIs? -->
   <p>If the canvas has no pixels (i.e. either its horizontal dimension
   or its vertical dimension is zero) then the method must return the
   string "<code title="">data:,</code>". (This is the shortest <code
-  title="">data:</code> URI; it represents the empty string in a <code
+  title="">data:</code> URL; it represents the empty string in a <code
   title="">text/plain</code> resource.)</p>
 
-  <!-- XXXURL data: URIs? -->
   <p>The <dfn title="dom-canvas-toDataURL-type"><code>toDataURL(<var
   title="">type</var>)</code></dfn> method (when called with one
-  <em>or more</em> arguments) must return a <code title="">data:</code> URI
-  containing a representation of the image in the format given by <var
-  title="">type</var>. The possible values are MIME types with no
-  parameters, for example <code>image/png</code>,
-  <code>image/jpeg</code>, or even maybe <code>image/svg+xml</code> if
-  the implementation actually keeps enough information to reliably
-  render an SVG image from the canvas.</p>
+  <em>or more</em> arguments) must return a <code
+  title="">data:</code> URL containing a representation of the image
+  in the format given by <var title="">type</var>. The possible values
+  are MIME types with no parameters, for example
+  <code>image/png</code>, <code>image/jpeg</code>, or even maybe
+  <code>image/svg+xml</code> if the implementation actually keeps
+  enough information to reliably render an SVG image from the
+  canvas.</p>
 
   <p>Only support for <code>image/png</code> is required. User agents
   may support other types. If the user agent does not support the
   requested type, it must return the image using the PNG format.</p>
 
-  <!-- XXXURL data: URIs? -->
   <p>User agents must convert the provided type to lower case before
   establishing if they support that type and before creating the <code
-  title="">data:</code> URI.</p> <!-- XXX define "convert to lower
+  title="">data:</code> URL.</p> <!-- XXX define "convert to lower
   case" -->
 
   <p class="note">When trying to use types other than
@@ -22419,10 +22414,11 @@
 
   <p>The <dfn title="attr-script-src"><code>src</code></dfn>
   attribute, if specified, gives the address of the external script
-  resource to use. The value of the attribute must be a <span>valid URL</span> to a script resource of the type given by the <code
-  title="attr-script-type">type</code> attribute, if the attribute is
-  present, or of the type "<code title="">text/javascript</code>", if
-  the attribute is absent.</p>
+  resource to use. The value of the attribute must be a <span>valid
+  URL</span> identifying a script resource of the type given by the
+  <code title="attr-script-type">type</code> attribute, if the
+  attribute is present, or of the type "<code
+  title="">text/javascript</code>", if the attribute is absent.</p>
 
   <p>The <dfn title="attr-script-charset"><code>charset</code></dfn>
   attribute gives the character encoding of the external script
@@ -23107,45 +23103,79 @@
   events generated by a remote server.</p>
 
   <p>The <dfn title="attr-event-source-src"><code>src</code></dfn>
-  attribute, if specified, must give a <span>valid URL</span> pointing to
-  a resource that uses the <code>text/event-stream</code> format.</p>
+  attribute, if specified, must give a <span>valid URL</span>
+  identifying a resource that uses the <code>text/event-stream</code>
+  format.</p>
 
-  <!-- XXXURL refer to new algorithms -->
-  <p>When the element is inserted into the document, if it has the
-  <code title="attr-event-source-src">src</code> attribute specified,
-  the user agent must act as if the <code
-  title="dom-remoteEventTarget-addEventSource">addEventSource()</code>
-  method on the <code>event-source</code> element had been invoked
-  with the URI resulting from resolving the <code
-  title="attr-event-source-src">src</code> attribute's value to an
-  absolute URI.</p>
+  <p>When an <code>event-source</code> element with a <code
+  title="attr-event-source-src">src</code> attribute specified is
+  inserted into the document<!-- XXX xref -->, and when an
+  <code>event-source</code> element that is already in the
+  document<!--XXX xref--> has a <code
+  title="attr-event-source-src">src</code> attribute added, the user
+  agent must run the <span>add declared event source</span>
+  algorithm.</p>
 
-  <!-- XXXURL refer to new algorithms -->
-  <p>While the element is in a document, if its <code
-  title="attr-event-source-src">src</code> attribute is mutated, the
-  user agent must act as if first the <code
-  title="dom-remoteEventTarget-removeEventSource">removeEventSource()</code>
-  method on the <code>event-source</code> element had been invoked
-  with the URI resulting from resolving the old value of the attribute
-  to an absolute URI, and then as if the <code
-  title="dom-remoteEventTarget-addEventSource">addEventSource()</code>
-  method on the element had been invoked with the URI resulting from
-  resolving the <em>new</em> value of the <code
-  title="attr-event-source-src">src</code> attribute to an absolute
-  URI.</p>
+  <p>While an <code>event-source</code> element is in a document<!--
+  XXX xref -->, if its <code title="attr-event-source-src">src</code>
+  attribute is mutated, the user agent must must run the <span>remove
+  declared event source</span> algorithm followed by the <span>add
+  declared event source</span> algorithm.</p>
 
-  <!-- XXXURL refer to new algorithms -->
-  <p>When the element is removed from the document, if it has the
-  <code title="attr-event-source-src">src</code> attribute specified,
-  or, when the <code title="attr-event-source-src">src</code>
-  attribute is about to be removed, the user agent must act as if the
-  <code
-  title="dom-remoteEventTarget-removeEventSource">removeEventSource()</code>
-  method on the <code>event-source</code> element had been invoked
-  with the URI resulting from resolving the <code
-  title="attr-event-source-src">src</code> attribute's value to an
-  absolute URI.</p>
+  <p>When an <code>event-source</code> element with a <code
+  title="attr-event-source-src">src</code> attribute specified is
+  removed from a document<!-- XXX xref -->, and when an
+  <code>event-source</code> element that is in a document<!--XXX
+  xref--> with a <code title="attr-event-source-src">src</code>
+  attribute specified has its <code
+  title="attr-event-source-src">src</code> attribute removed, the user
+  agent must run the <span>remove declared event source</span>
+  algorithm.</p>
 
+  <p>When it is created, an <code>event-source</code> element must
+  have its <i>current declared event source</i> set to
+  "undefined".</p>
+
+  <p>The <dfn>add declared event source</dfn> algorithm is as
+  follows:</p>
+
+  <ol>
+
+   <li><span title="resolve a url">Resolve</span> the <span>URL</span>
+   specified by the <code>event-source</code> element's <code
+   title="attr-event-source-src">src</code> attribute.</li>
+
+   <li>If that fails, then set the element's <i>current declared event
+   source</i> to "undefined" and abort these steps.</li>
+
+   <li>Otherwise, act as if the <code
+   title="dom-remoteEventTarget-addEventSource">addEventSource()</code>
+   method on the <code>event-source</code> element had been invoked
+   with the resulting <span>absolute URL</span>.</li>
+
+   <li>Let the element's <i>current declared event source</i> be that
+   <span>absolute URL</span>.</li>
+
+  </ol>
+
+  <p>The <dfn>remove declared event source</dfn> algorithm is as
+  follows:</p>
+
+  <ol>
+
+   <li>If the element's <i>current declared event source</i> is
+   "undefined", abort these steps.</li>
+
+   <li>Otherwise, act as if the <code
+   title="dom-remoteEventTarget-removeEventSource">removeEventSource()</code>
+   method on the <code>event-source</code> element had been invoked
+   with the element's <i>current declared event source</i>.</li>
+
+   <li>Let the element's <i>current declared event source</i> be
+   "undefined".</li>
+
+  </ol>
+
   <p>There can be more than one <code>event-source</code> element per
   document, but authors should take care to avoid opening multiple
   connections to the same server as HTTP recommends a limit to the
@@ -23156,10 +23186,13 @@
   element? -->
 
   <p>The <dfn title="dom-event-source-src"><code>src</code></dfn> DOM
-  attribute must <span>reflect</span> the content attribute of the same name.</p>
+  attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
 
 
+  <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
 
+
   <h3 id="interactive-elements">Interactive elements</h3>
 
   <h4>The <dfn><code>details</code></dfn> element</h4>




More information about the Commit-Watchers mailing list