W3C home > Mailing lists > Public > public-html-commits@w3.org > July 2008

html5/spec Overview.html,1.1105,1.1106

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 23 Jul 2008 22:24:54 +0000
To: public-html-commits@w3.org
Message-Id: <E1KLmlS-0000DM-Lb@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv785

Modified Files:
	Overview.html 
Log Message:
Fix the spec to use the [Constructor] syntax from WebIDL to define constructors. (whatwg r1916)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1105
retrieving revision 1.1106
diff -u -d -r1.1105 -r1.1106
--- Overview.html	23 Jul 2008 22:06:43 -0000	1.1105
+++ Overview.html	23 Jul 2008 22:24:52 -0000	1.1106
@@ -972,16 +972,19 @@
        <li><a href="#the-option"><span class=secno>4.9.9 </span>The
         <code>option</code> element</a>
 
-       <li><a href="#the-textarea"><span class=secno>4.9.10 </span>The
+       <li><a href="#constructors"><span class=secno>4.9.10
+        </span>Constructors</a>
+
+       <li><a href="#the-textarea"><span class=secno>4.9.11 </span>The
         <code>textarea</code> element</a>
 
-       <li><a href="#the-output"><span class=secno>4.9.11 </span>The
+       <li><a href="#the-output"><span class=secno>4.9.12 </span>The
         <code>output</code> element</a>
 
-       <li><a href="#processing0"><span class=secno>4.9.12 </span>Processing
+       <li><a href="#processing0"><span class=secno>4.9.13 </span>Processing
         model</a>
         <ul class=toc>
-         <li><a href="#form-submission"><span class=secno>4.9.12.1.
+         <li><a href="#form-submission"><span class=secno>4.9.13.1.
           </span>Form submission</a>
         </ul>
       </ul>
@@ -1176,13 +1179,10 @@
       <ul class=toc>
        <li><a href="#security3"><span class=secno>5.2.1 </span>Security</a>
 
-       <li><a href="#constructors"><span class=secno>5.2.2
-        </span>Constructors</a>
-
-       <li><a href="#apis-for"><span class=secno>5.2.3 </span>APIs for
+       <li><a href="#apis-for"><span class=secno>5.2.2 </span>APIs for
         creating and navigating browsing contexts by name</a>
 
-       <li><a href="#accessing"><span class=secno>5.2.4 </span>Accessing
+       <li><a href="#accessing"><span class=secno>5.2.3 </span>Accessing
         other browsing contexts</a>
       </ul>
 
@@ -15291,7 +15291,10 @@
 
    <dd>
     <pre
-     class=idl>interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+     class=idl>[NamedConstructor=<a href="#image" title=dom-image>Image</a>(),
+ NamedConstructor=<a href="#image0" title=dom-image-w>Image</a>(in unsigned long width),
+ NamedConstructor=<a href="#image1" title=dom-image-wh>Image</a>(in unsigned long width, in unsigned long height)]
+interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <a href="#alt0" title=dom-img-alt>alt</a>;
            attribute DOMString <a href="#src0" title=dom-img-src>src</a>;
            attribute DOMString <a href="#usemap" title=dom-img-useMap>useMap</a>;
@@ -15300,11 +15303,6 @@
            attribute long <a href="#height" title=dom-img-height>height</a>;
   readonly attribute boolean <a href="#complete" title=dom-img-complete>complete</a>;
 };</pre>
-
-    <p class=note>An instance of <code><a
-     href="#htmlimageelement">HTMLImageElement</a></code> can be obtained
-     using the <code title=dom-image><a href="#image0">Image</a></code>
-     constructor.</p>
   </dl>
 
   <p>An <code><a href="#img">img</a></code> element represents an image.
@@ -15782,7 +15780,7 @@
 
   <p>The <code title=attr-hyperlink-usemap><a
    href="#usemap1">usemap</a></code> attribute, if present, can indicate that
-   the image has an associated <a href="#image">image map</a>.
+   the image has an associated <a href="#image2">image map</a>.
 
   <p>The <dfn id=ismap title=attr-img-ismap><code>ismap</code></dfn>
    attribute, when used on an element that is a descendant of an <code><a
@@ -15828,6 +15826,23 @@
    href="#complete">complete</a></code> can change while a script is
    executing.
 
+  <p>Three constructors are provided for creating <code><a
+   href="#htmlimageelement">HTMLImageElement</a></code> objects (in addition
+   to the factory methods from DOM Core such as <code
+   title="">createElement()</code>): <dfn id=image
+   title=dom-image><code>Image()</code></dfn>, <dfn id=image0
+   title=dom-image-w><code>Image(<var title="">width</var>)</code></dfn>, and
+   <dfn id=image1 title=dom-image-wh><code>Image(<var title="">width</var>,
+   <var title="">height</var>)</code></dfn>. When invoked as constructors,
+   these must return a new <code><a
+   href="#htmlimageelement">HTMLImageElement</a></code> object (a new
+   <code><a href="#img">img</a></code> element). If the <var
+   title="">width</var> argument is present, the new object's <code
+   title=attr-img-width>width</code> content attribute must be set to <var
+   title="">width</var>. If the <var title="">height</var> argument is also
+   present, the new object's <code title=attr-img-height>height</code>
+   content attribute must be set to <var title="">height</var>.
+
   <div class=example>
    <p>A single image can have different appropriate alternative text
     depending on the context.</p>
@@ -16822,7 +16837,7 @@
   <p>The <code title=attr-hyperlink-usemap><a
    href="#usemap1">usemap</a></code> attribute, if present while the <code><a
    href="#object">object</a></code> element represents an image, can indicate
-   that the object has an associated <a href="#image">image map</a>. The
+   that the object has an associated <a href="#image2">image map</a>. The
    attribute must be ignored if the <code><a href="#object">object</a></code>
    element doesn't represent an image.
 
@@ -17306,7 +17321,9 @@
 
    <dd>
     <pre
-     class=idl>interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediaelement">HTMLMediaElement</a> {
+     class=idl>[NamedConstructor=<a href="#audio2" title=dom-Audio>Audio</a>(),
+ NamedConstructor=<a href="#audio3" title=dom-Audio-u>Audio</a>(in DOMString url)]
+interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href="#htmlmediaelement">HTMLMediaElement</a> {
   // no members
 };</pre>
   </dl>
@@ -17353,6 +17370,21 @@
    href="#actively">actively playing</a>, audio must not play for the
    element.
 
+  <p>Two constructors are provided for creating <code><a
+   href="#htmlaudioelement">HTMLAudioElement</a></code> objects (in addition
+   to the factory methods from DOM Core such as <code
+   title="">createElement()</code>): <dfn id=audio2
+   title=dom-Audio><code>Audio()</code></dfn> and <dfn id=audio3
+   title=dom-Audio-u><code>Audio(<var title="">url</var>)</code></dfn>. When
+   invoked as constructors, these must return a new <code><a
+   href="#htmlaudioelement">HTMLAudioElement</a></code> object (a new
+   <code><a href="#audio1">audio</a></code> element). If the <var
+   title="">src</var> argument is present, the object created must have its
+   <code title=dom-media-src><a href="#src8">src</a></code> content attribute
+   set to the provided value, and the user agent must invoke the <code
+   title=dom-media-load><a href="#load">load()</a></code> method on the
+   object before returning.
+
   <h5 id=audio0><span class=secno>4.7.8.1. </span>Audio codecs for <code><a
    href="#audio1">audio</a></code> elements</h5>
 
@@ -22547,7 +22579,7 @@
 
   <p>The <code><a href="#map">map</a></code> element, in conjunction with any
    <code><a href="#area">area</a></code> element descendants, defines an <a
-   href="#image">image map</a>.
+   href="#image2">image map</a>.
 
   <p>The <dfn id=name7 title=attr-map-name><code>name</code></dfn> attribute
    gives the map a name so that it can be referenced. The attribute must be
@@ -22566,7 +22598,7 @@
    <code>Document</code> node, whose filter matches only <code><a
    href="#img">img</a></code> and <code><a href="#object">object</a></code>
    elements that are associated with this <code><a href="#map">map</a></code>
-   element according to the <a href="#image">image map</a> processing model.
+   element according to the <a href="#image2">image map</a> processing model.
 
   <p>The DOM attribute <dfn id=name8
    title=dom-map-name><code>name</code></dfn> must <a
@@ -22633,7 +22665,7 @@
 
   <p>The <code><a href="#area">area</a></code> element represents either a
    hyperlink with some text and a corresponding area on an <a
-   href="#image">image map</a>, or a dead area on an image map.
+   href="#image2">image map</a>, or a dead area on an image map.
 
   <p>If the <code><a href="#area">area</a></code> element has an <code
    title=attr-hyperlink-href><a href="#href6">href</a></code> attribute, then
@@ -22724,7 +22756,7 @@
    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
-   <a href="#image">image map</a> processing model.
+   <a href="#image2">image map</a> processing model.
 
   <p>In the <a href="#circle" title=attr-area-shape-circle>circle state</a>,
    <code><a href="#area">area</a></code> elements must have a <code
@@ -22839,7 +22871,7 @@
   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0D%0A%3Cp%3E%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/astrophy/128%22%20usemap%3D%23a%3E%0D%0A%3Cmap%20name%3Da%3E%3Carea%20shape%3Dcirc%20coords%3D%2220%2C20%2C10%25%22%20href%3D%23%3E%3Carea%20shape%3Dcirc%20coords%3D%2220%2C20%2C10%22%20href%3D%23%3E%3C/map%3E%0D%0A%3Cscript%3Edocument.write%28document.getElementsByTagName%28%27area%27%29%5B0%5D.coords%29%3C/script%3E
   -->
 
-  <p>An <dfn id=image>image map</dfn> allows geometric areas on an image to
+  <p>An <dfn id=image2>image map</dfn> allows geometric areas on an image to
    be associated with <a href="#hyperlinks" title=hyperlink>hyperlinks</a>.
 
   <p>An image, in the form of an <code><a href="#img">img</a></code> element
@@ -25079,19 +25111,40 @@
   <h4 id=the-option><span class=secno>4.9.9 </span>The <code>option</code>
    element</h4>
 
-  <h4 id=the-textarea><span class=secno>4.9.10 </span>The
+  <h4 id=constructors><span class=secno>4.9.10 </span>Constructors</h4>
+
+  <p>All <code><a href="#window">Window</a></code> objects must provide the
+   following constructors:
+
+  <dl>
+   <dt><dfn id=option title=dom-option><code>Option()</code></dfn>
+
+   <dt><dfn id=optionin title=dom-option-n><code>Option(in DOMString <var
+    title="">name</var>)</code></dfn>
+
+   <dt><dfn id=optionin0 title=dom-option-nv><code>Option(in DOMString <var
+    title="">name</var>, in DOMString <var title="">value</var>)</code></dfn>
+
+   <dd>
+    <p>When invoked as constructors, these must return a new
+     <code>HTMLOptionElement</code> object (a new <code>option</code>
+     element). <span class=big-issue>need to define argument
+     processing</span>
+  </dl>
+
+  <h4 id=the-textarea><span class=secno>4.9.11 </span>The
    <code>textarea</code> element</h4>
 
-  <h4 id=the-output><span class=secno>4.9.11 </span>The <code>output</code>
+  <h4 id=the-output><span class=secno>4.9.12 </span>The <code>output</code>
    element</h4>
 
-  <h4 id=processing0><span class=secno>4.9.12 </span>Processing model</h4>
+  <h4 id=processing0><span class=secno>4.9.13 </span>Processing model</h4>
 
   <p class=big-issue>See <a
    href="http://www.whatwg.org/specs/web-forms/current-work/#extend-form-controls">WF2</a>
    for now
 
-  <h5 id=form-submission><span class=secno>4.9.12.1. </span>Form submission</h5>
+  <h5 id=form-submission><span class=secno>4.9.13.1. </span>Form submission</h5>
 
   <p class=big-issue>See <a
    href="http://www.whatwg.org/specs/web-forms/current-work/#form-submission">WF2</a>
@@ -30908,61 +30961,7 @@
    title=dom-location><a href="#location1">location</a></code> object's
    setter.
 
-  <h4 id=constructors><span class=secno>5.2.2 </span>Constructors</h4>
-
-  <p>All <code><a href="#window">Window</a></code> objects must provide the
-   following constructors:
-
-  <dl>
-   <dt><dfn id=audio2 title=dom-audio><code>Audio()</code></dfn>
-
-   <dt><dfn id=audio3 title=dom-audio-s><code>Audio(<var
-    title="">src</var>)</code></dfn>
-
-   <dd>
-    <p>When invoked as constructors, these must return a new <code><a
-     href="#htmlaudioelement">HTMLAudioElement</a></code> object (a new
-     <code><a href="#audio1">audio</a></code> element). If the <var
-     title=src>src</var> argument is present, the object created must have
-     its <code title=dom-media-src><a href="#src8">src</a></code> content
-     attribute set to the provided value, and the user agent must invoke the
-     <code title=dom-media-load><a href="#load">load()</a></code> method on
-     the object before returning.
-
-   <dt><dfn id=image0 title=dom-image><code>Image()</code></dfn>
-
-   <dt><dfn id=imagein title=dom-image-w><code>Image(in unsigned long <var
-    title="">w</var>)</code></dfn>
-
-   <dt><dfn id=imagein0 title=dom-image-wh><code>Image(in unsigned long <var
-    title="">w</var>, in unsigned long <var title="">h</var>)</code></dfn>
-
-   <dd>
-    <p>When invoked as constructors, these must return a new <code><a
-     href="#htmlimageelement">HTMLImageElement</a></code> object (a new
-     <code><a href="#img">img</a></code> element). If the <var
-     title="">h</var> argument is present, the new object's <code
-     title=attr-img-height>height</code> content attribute must be set to
-     <var title="">h</var>. If the <var title="">w</var> argument is present,
-     the new object's <code title=attr-img-width>width</code> content
-     attribute must be set to <var title="">w</var>.
-
-   <dt><dfn id=option title=dom-option><code>Option()</code></dfn>
-
-   <dt><dfn id=optionin title=dom-option-n><code>Option(in DOMString <var
-    title="">name</var>)</code></dfn>
-
-   <dt><dfn id=optionin0 title=dom-option-nv><code>Option(in DOMString <var
-    title="">name</var>, in DOMString <var title="">value</var>)</code></dfn>
-
-   <dd>
-    <p>When invoked as constructors, these must return a new
-     <code>HTMLOptionElement</code> object (a new <code>option</code>
-     element). <span class=big-issue>need to define argument
-     processing</span>
-  </dl>
-
-  <h4 id=apis-for><span class=secno>5.2.3 </span>APIs for creating and
+  <h4 id=apis-for><span class=secno>5.2.2 </span>APIs for creating and
    navigating browsing contexts by name</h4>
 
   <p>The <dfn id=open2 title=dom-open><code>open()</code></dfn> method on
@@ -31045,7 +31044,7 @@
   <p class=note>The name <a href="#resetBCName">gets reset</a> when the
    browsing context is navigated to another domain.
 
-  <h4 id=accessing><span class=secno>5.2.4 </span>Accessing other browsing
+  <h4 id=accessing><span class=secno>5.2.3 </span>Accessing other browsing
    contexts</h4>
 
   <p>The <dfn id=length7 title=dom-length><code>length</code></dfn> DOM
@@ -41909,9 +41908,9 @@
   <h4 id=the-websocket><span class=secno>7.3.2 </span>The <code><a
    href="#websocket0">WebSocket</a></code> interface</h4>
 
-  <pre class=idl>interface <dfn id=websocket0>WebSocket</dfn> {
-  // constructor
-  [<a href="#websocket1" title=dom-WebSocket>Constructor</a>] <a href="#websocket0">WebSocket</a>(in DOMString url);
+  <pre class=idl>
+[<a href="#websocket1" title=dom-WebSocket>Constructor</a>(in DOMString url)]
+interface <dfn id=websocket0>WebSocket</dfn> {
   readonly attribute DOMString <a href="#url2" title=dom-WebSocket-URL>URL</a>;
 
   // ready state
@@ -43016,7 +43015,8 @@
   <h4 id=message><span class=secno>7.5.2 </span>Message channels</h4>
 
   <pre
-   class=idl>[<span title=dom-Pipe>Constructor</span>] interface <dfn id=messagechannel>MessageChannel</dfn> {
+   class=idl>[<a href="#messagechannel0" title=dom-MessageChannel>Constructor</a>]
+interface <dfn id=messagechannel>MessageChannel</dfn> {
   readonly attribute <a href="#messageport0">MessagePort</a> <a href="#port1" title=dom-channel-port1>port1</a>;
   readonly attribute <a href="#messageport0">MessagePort</a> <a href="#port2" title=dom-channel-port2>port2</a>;
 };</pre>
Received on Wednesday, 23 July 2008 22:25:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 9 October 2008 20:32:58 GMT