[html5] r1430 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Apr 10 21:28:09 PDT 2008


Author: ianh
Date: 2008-04-10 21:28:06 -0700 (Thu, 10 Apr 2008)
New Revision: 1430

Modified:
   index
   source
Log:
[] (0) Update the spec for consistency with WebIDL.

Modified: index
===================================================================
--- index	2008-04-10 21:50:13 UTC (rev 1429)
+++ index	2008-04-11 04:28:06 UTC (rev 1430)
@@ -24,7 +24,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=working>Working Draft — 10 April 2008</h2>
+   <h2 class="no-num no-toc" id=working>Working Draft — 11 April 2008</h2>
 
    <p>You can take part in this work. <a
     href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -1775,8 +1775,6 @@
       scenes</a>
 
      <li><a href="#timers"><span class=secno>11.4 </span>Timers</a>
-
-     <li><a href="#events2"><span class=secno>11.5 </span>Events</a>
     </ul>
 
    <li class=no-num><a href="#references">References</a>
@@ -2230,18 +2228,16 @@
    Not-a-Number value, a <code title=big-issue>NOT_SUPPORTED_ERR</code>
    exception must be raised.
 
-  <p>Unless other specified, if a DOM attribute that is a signed numeric type
-   is assigned a negative value, a <code
-   title=big-issue>NOT_SUPPORTED_ERR</code> exception must be raised.
-
   <p>Unless other specified, if a method with an argument that is a floating
    point number type (<code title="">float</code>) is passed an Infinity or
    Not-a-Number value, a <code title=big-issue>NOT_SUPPORTED_ERR</code>
-   exception must be raised.
+   exception must be raised.</p>
+  <!-- XXX DOMB -->
 
   <p>Unless other specified, if a method is passed fewer arguments than is
    defined for that method in its IDL definition, a <code
-   title=big-issue>NOT_SUPPORTED_ERR</code> exception must be raised.
+   title=big-issue>NOT_SUPPORTED_ERR</code> exception must be raised.</p>
+  <!-- XXX DOMB -->
 
   <p>Unless other specified, if a method is passed more arguments than is
    defined for that method in its IDL definition, the excess arguments must
@@ -2251,20 +2247,6 @@
   requirement in the canvas section for toDataURL() and
   getContext(). -->
 
-  <p>Unless other specified, if a method is expecting, as one of its
-   arguments, as defined by its IDL definition, an object implementing a
-   particular interface <var title="">X</var>, and the argument passed is an
-   object whose [[Class]] property is neither that interface <var
-   title="">X</var>, nor the name of an interface <var title="">Y</var> where
-   this specification requires that all objects implementing interface <var
-   title="">Y</var> also implement interface <var title="">X</var>, nor the
-   name of an interface that inherits from the expected interface <var
-   title="">X</var>, then a <code title="">TYPE_MISMATCH_ERR</code> exception
-   must be raised.
-
-  <p class=big-issue>Anything else? Passing the wrong type of object, maybe?
-   Implied conversions to int/float?
-
   <h4 id=dependencies><span class=secno>1.3.2 </span>Dependencies</h4>
 
   <p>This specification relies on several other underlying specifications.
@@ -2305,9 +2287,9 @@
    <dd>
     <p>Implementations that use ECMAScript to implement the APIs defined in
      this specification must implement them in a manner consistent with the
-     ECMAScript Bindings for DOM Specifications specification, as this
+     ECMAScript Bindings defined in the Web IDL specification, as this
      specification uses that specification's terminology. <a
-     href="#refsEBFD">[EBFD]</a></p>
+     href="#refsWebIDL">[WebIDL]</a></p>
   </dl>
 
   <p>This specification does not require support of any particular network
@@ -2465,34 +2447,19 @@
    visual medium; they must be considered to apply to other media in
    equivalent ways.
 
-  <p>Various DOM interfaces are defined in this specification using
-   pseudo-IDL. This looks like OMG IDL but isn't. For instance, method
-   overloading is used, and types from the W3C DOM specifications are used
-   without qualification. Language-specific bindings for these abstract
-   interface definitions must be derived in the way consistent with W3C DOM
-   specifications. Some interface-specific binding information for ECMAScript
-   is included in this specification.
+  <p>DOM interfaces defined in this specification use Web IDL. User agents
+   must implement these interfaces as defined by the Web IDL specification.
+   <a href="#refsWEBIDL">[WEBIDL]</a>
 
-  <p class=big-issue>The current situation with IDL blocks is pitiful. IDL is
-   totally inadequate to properly represent what objects have to look like in
-   JS; IDL can't say if a member is enumerable, what the indexing behaviour
-   is, what the stringification behaviour is, what behaviour setting a member
-   whose type is a particular interface should be (e.g. setting of
-   document.location or element.className), what constructor an object
-   implementing an interface should claim to have, how overloads work, etc. I
-   think we should make the IDL blocks non-normative, and/or replace them
-   with something else that is better for JS while still being clear on how
-   it applies to other languages. However, we do need to have something that
-   says what types the methods take as arguments, since we have to raise
-   exceptions if they are wrong.
-
   <p>The construction "a <code>Foo</code> object", where <code>Foo</code> is
    actually an interface, is sometimes used instead of the more accurate "an
    object implementing the interface <code>Foo</code>".
 
   <p>A DOM attribute is said to be <em>getting</em> when its value is being
    retrieved (e.g. by author script), and is said to be <em>setting</em> when
-   a new value is assigned to it.
+   a new value is assigned to it.</p>
+  <!-- XXX
+  define this in terms of [[Get]] and [[Put]] ? -->
 
   <p>If a DOM object is said to be <dfn id=live>live</dfn>, then that means
    that any attributes returning that object must always return the same
@@ -2616,7 +2583,7 @@
 
   <pre class=idl>interface <dfn id=htmldocument>HTMLDocument</dfn> {
   // <a href="#resource0">Resource metadata management</a>
-  readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</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>;
            attribute DOMString <a href="#domain" title=dom-document-domain>domain</a>;
   readonly attribute DOMString <a href="#referrer" title=dom-document-referrer>referrer</a>;
@@ -3106,8 +3073,8 @@
 
   <pre class=idl>interface <dfn id=htmlcollection0>HTMLCollection</dfn> {
   readonly attribute unsigned long <a href="#length" title=dom-HTMLCollection-length>length</a>;
-  Element <a href="#itemindex" title=dom-HTMLCollection-item>item</a>(in unsigned long index);
-  Element <a href="#nameditem" title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name);
+  [IndexGetter] Element <a href="#itemindex" title=dom-HTMLCollection-item>item</a>(in unsigned long index);
+  [NameGetter] Element <a href="#nameditem" title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name);
 };</pre>
 
   <p>The <dfn id=length
@@ -3142,16 +3109,6 @@
 
   <p>If no such elements are found, then the method must return null.
 
-  <p>In ECMAScript implementations, objects that implement the <code><a
-   href="#htmlcollection0">HTMLCollection</a></code> interface must also have
-   a [[Get]] method that, when invoked with a property name that is a number,
-   acts like the <code title=dom-HTMLCollection-item><a
-   href="#itemindex">item()</a></code> method would when invoked with that
-   argument, and when invoked with a property name that is a string, acts
-   like the <code title=dom-HTMLCollection-namedItem><a
-   href="#nameditem">namedItem()</a></code> method would when invoked with
-   that argument.
-
   <h5 id=htmlformcontrolscollection><span class=secno>2.3.1.2.
    </span>HTMLFormControlsCollection</h5>
 
@@ -3162,8 +3119,8 @@
   <pre
    class=idl>interface <dfn id=htmlformcontrolscollection0>HTMLFormControlsCollection</dfn> {
   readonly attribute unsigned long <a href="#length0" title=dom-HTMLFormControlsCollection-length>length</a>;
-  <a href="#htmlelement">HTMLElement</a> <a href="#itemindex0" title=dom-HTMLFormControlsCollection-item>item</a>(in unsigned long index);
-  Object <a href="#nameditem0" title=dom-HTMLFormControlsCollection-namedItem>namedItem</a>(in DOMString name);
+  [IndexGetter] <a href="#htmlelement">HTMLElement</a> <a href="#itemindex0" title=dom-HTMLFormControlsCollection-item>item</a>(in unsigned long index);
+  [NameGetter] Object <a href="#nameditem0" title=dom-HTMLFormControlsCollection-namedItem>namedItem</a>(in DOMString name);
 };</pre>
 
   <p>The <dfn id=length0
@@ -3207,16 +3164,6 @@
 
    <li>Return that <code>NodeList</code> object.
   </ol>
-
-  <p>In the ECMAScript DOM binding, objects implementing the <code><a
-   href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>
-   interface must support being dereferenced using the square bracket
-   notation, such that dereferencing with an integer index is equivalent to
-   invoking the <code title=dom-HTMLFormControlsCollection-item><a
-   href="#itemindex0">item()</a></code> method with that index, and such that
-   dereferencing with a string index is equivalent to invoking the <code
-   title=dom-HTMLFormControlsCollection-namedItem><a
-   href="#nameditem0">namedItem()</a></code> method with that index.</p>
   <!--
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E...%0A%3Cform%20name%3D%22a%22%3E%3Cinput%20id%3D%22x%22%20name%3D%22y%22%3E%3Cinput%20name%3D%22x%22%20id%3D%22y%22%3E%3C/form%3E%0A%3Cscript%3E%0A%20%20var%20x%3B%0A%20%20w%28x%20%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20x%5B0%5D.parentNode.removeChild%28x%5B0%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20w%28x%20%3D%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%3C/script%3E%0A
 -->
@@ -3231,8 +3178,8 @@
   <pre
    class=idl>interface <dfn id=htmloptionscollection0>HTMLOptionsCollection</dfn> {
            attribute unsigned long <a href="#length1" title=dom-HTMLOptionsCollection-length>length</a>;
-  HTMLOptionElement <a href="#itemindex1" title=dom-HTMLOptionsCollection-item>item</a>(in unsigned long index);
-  Object <a href="#nameditem1" title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(in DOMString name);
+  [IndexGetter] HTMLOptionElement <a href="#itemindex1" title=dom-HTMLOptionsCollection-item>item</a>(in unsigned long index);
+  [NameGetter] Object <a href="#nameditem1" title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(in DOMString name);
 };</pre>
 
   <p>On getting, the <dfn id=length1
@@ -3295,16 +3242,6 @@
 
    <li>Return that <code>NodeList</code> object.
   </ol>
-
-  <p>In the ECMAScript DOM binding, objects implementing the <code><a
-   href="#htmloptionscollection0">HTMLOptionsCollection</a></code> interface
-   must support being dereferenced using the square bracket notation, such
-   that dereferencing with an integer index is equivalent to invoking the
-   <code title=dom-HTMLOptionsCollection-item><a
-   href="#itemindex1">item()</a></code> method with that index, and such that
-   dereferencing with a string index is equivalent to invoking the <code
-   title=dom-HTMLOptionsCollection-namedItem><a
-   href="#nameditem1">namedItem()</a></code> method with that index.</p>
   <!-- see also http://ln.hixie.ch/?start=1161042744&count=1 -->
 
   <p class=big-issue>We may want to add <code>add()</code> and
@@ -3329,9 +3266,10 @@
    author-implemented callback in the <code><a
    href="#datagrid0">datagrid</a></code> APIs).
 
-  <pre class=idl>interface <dfn id=domtokenlist0>DOMTokenList</dfn> {
+  <pre
+   class=idl>[<a href="#stringify" title=dom-tokenlist-toString>Stringifies</a>] interface <dfn id=domtokenlist0>DOMTokenList</dfn> {
   readonly attribute unsigned long <a href="#length2" title=dom-tokenlist-length>length</a>;
-  DOMString <a href="#itemindex2" title=dom-tokenlist-item>item</a>(in unsigned long index);
+  [IndexGetter] DOMString <a href="#itemindex2" title=dom-tokenlist-item>item</a>(in unsigned long index);
   boolean <a href="#hastoken" title=dom-tokenlist-has>has</a>(in DOMString token);
   void <a href="#addtoken" title=dom-tokenlist-add>add</a>(in DOMString token);
   void <a href="#remove" title=dom-tokenlist-remove>remove</a>(in DOMString token);
@@ -3354,13 +3292,6 @@
    item in this list. If <var title="">index</var> is equal to or greater
    than the number of tokens, then the method must return null.
 
-  <p>In ECMAScript implementations, objects that implement the <code><a
-   href="#domtokenlist0">DOMTokenList</a></code> interface must also have a
-   [[Get]] method that, when invoked with a property name that is a number,
-   acts like the <code title=dom-tokenlist-item><a
-   href="#itemindex2">item()</a></code> method would when invoked with that
-   argument.
-
   <p>The <dfn id=hastoken title=dom-tokenlist-has><code>has(<var
    title="">token</var>)</code></dfn> method must run the following
    algorithm:
@@ -3453,9 +3384,10 @@
    <li>Return true.
   </ol>
 
-  <p>In the ECMAScript DOM binding, objects implementing the <code><a
-   href="#domtokenlist0">DOMTokenList</a></code> interface must stringify to
-   the object's underlying string representation.
+  <p>Objects implementing the <code><a
+   href="#domtokenlist0">DOMTokenList</a></code> interface must <dfn
+   id=stringify title=dom-tokenlist-toString>stringify</dfn> to the object's
+   underlying string representation.
 
   <h4 id=domstringmap><span class=secno>2.3.3 </span>DOMStringMap</h4>
 
@@ -3466,29 +3398,28 @@
    for setting names to certain values, and one for deleting names.
 
   <p class=big-issue>The names of the methods on this interface are temporary
-   and will be fixed when the "Language Bindings for DOM Specifications" spec
-   is ready to handle this case.
+   and will be fixed when the Web IDL / "Language Bindings for DOM
+   Specifications" spec is ready to handle this case.
 
   <pre class=idl>interface <dfn id=domstringmap0>DOMStringMap</dfn> {
-  DOMString <a href="#getname" title="dom-stringmap-[[Get]]">[[Get]]</a>(in DOMString name);
-  void <a href="#putname" title="dom-stringmap-[[Put]]">[[Put]]</a>(in DOMString name, in DOMString value);
-  bool <a href="#delete" title="dom-stringmap-[[Delete]]">[[Delete]]</a>(in DOMString name);
+  [NameGetter] DOMString <a href="#xxx1name" title=dom-stringmap-XXX1>XXX1</a>(in DOMString name);
+  [NameSetter] void <a href="#xxx2name" title=dom-stringmap-XXX2>XXX2</a>(in DOMString name, in DOMString value);
+  [XXX] bool <a href="#xxx3name" title=dom-stringmap-XXX3>XXX3</a>(in DOMString name);
 };</pre>
 
-  <p>The <dfn id=getname title="dom-stringmap-[[Get]]"><code>[[Get]](<var
+  <p>The <dfn id=xxx1name title=dom-stringmap-XXX1><code>XXX1(<var
    title="">name</var>)</code></dfn> method must call the algorithm for
    getting values from names, passing <var title="">name</var> as the name,
    and must return the corresponding value, or null if <var
    title="">name</var> has no corresponding value.
 
-  <p>The <dfn id=putname title="dom-stringmap-[[Put]]"><code>[[Put]](<var
+  <p>The <dfn id=xxx2name title=dom-stringmap-XXX2><code>XXX2(<var
    title="">name</var>, <var title="">value</var>)</code></dfn> method must
    call the algorithm for setting names to certain values, passing <var
    title="">name</var> as the name and <var title="">value</var> as the
    value.
 
-  <p>The <dfn id=delete
-   title="dom-stringmap-[[Delete]]"><code>[[Delete]](<var
+  <p>The <dfn id=xxx3name title=dom-stringmap-XXX3><code>XXX3(<var
    title="">name</var>)</code></dfn> method must call the algorithm for
    deleting names, passing <var title="">name</var> as the name, and must
    return true.
@@ -6978,7 +6909,10 @@
   that implement the <code>Document</code> interface using
   binding-specific casting methods.</p>
 
-  <pre class="idl">interface <dfn>DocumentFocus</dfn> {
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into those interfaces somehow.</p>
+
+  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
   void moveFocusForward();
   void moveFocusBackward();
   void moveFocusUp();
@@ -10422,7 +10356,7 @@
 
    <dd>
     <pre
-     class=idl>interface <dfn id=htmlanchorelement>HTMLAnchorElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+     class=idl>[Stringifies=href] interface <dfn id=htmlanchorelement>HTMLAnchorElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
            attribute DOMString <a href="#href3" title=dom-a-href>href</a>;
            attribute DOMString <a href="#target1" title=dom-a-target>target</a>;
            attribute DOMString <a href="#ping0" title=dom-a-ping>ping</a>;
@@ -10432,7 +10366,7 @@
            attribute DOMString <a href="#hreflang1" title=dom-a-hreflang>hreflang</a>;
            attribute DOMString <a href="#type3" title=dom-a-type>type</a>;
 };</pre>
-
+    <!-- XXX also support the URI decomposition attributes -->
     <p>The <code title=command-ro><a href="#command2">Command</a></code>
      interface must also be implemented by this element.</p>
   </dl>
@@ -16078,8 +16012,8 @@
      href="#cue-ranges0" title="cue range">cue ranges</a> in the <var
      title="">other ranges</var> list to "false" (inactive).
   </ol>
-  <!-- XXX the remainder of this subsection will be removed once we
-  have a way to mark up callbacks in IDL -->
+  <!-- XXX the remainder of this subsection may be removed if we ever
+  get a way to mark up callbacks in IDL -->
 
   <p>Invoking a callback (an object implementing the <code><a
    href="#voidcallback">VoidCallback</a></code> interface) means calling its
@@ -16096,19 +16030,6 @@
    href="#voidcallback">VoidCallback</a></code> interface is the entrypoint
    for the callback represented by the object.
 
-  <p>In the ECMAScript DOM binding, the ECMAScript native
-   <code>Function</code> type must implement the <code><a
-   href="#voidcallback">VoidCallback</a></code> interface such that invoking
-   the <code>handleEvent()</code> method of that interface on the object from
-   another language binding invokes the function itself. In the ECMAScript
-   binding itself, however, the <code>handleEvent()</code> method of the
-   interface is not directly accessible on <code>Function</code> objects.
-   Such functions, when invoked, must be called at the scope of the <a
-   href="#browsing0">browsing context</a>.</p>
-  <!--
-  XXX if you change this make sure to also look up the other mentions
-  of handleEvent() in this file -->
-
   <h5 id=user-interface><span class=secno>3.12.9.10. </span>User interface</h5>
 
   <p>The <dfn id=controls
@@ -22257,7 +22178,8 @@
    represented by objects that implement the <a
    href="#rowspecification">RowSpecification</a> interface.
 
-  <pre class=idl>interface <dfn id=rowspecification>RowSpecification</dfn> {
+  <pre
+   class=idl>[NoInterfaceObject] interface <dfn id=rowspecification>RowSpecification</dfn> {
   // binding-specific interface
 };</pre>
 
@@ -22291,7 +22213,7 @@
    (and most commonly) the content author's implementation(s).</em>
 
   <pre class=idl>// To be implemented by Web authors as a JS object
-interface <dfn id=datagriddataprovider>DataGridDataProvider</dfn> {
+[NoInterfaceObject] interface <dfn id=datagriddataprovider>DataGridDataProvider</dfn> {
   void <a href="#initialize" title=dom-provider-initialize>initialize</a>(in HTMLDataGridElement datagrid);
   unsigned long <a href="#getrowcount" title=dom-provider-getRowCount>getRowCount</a>(in <a href="#rowspecification">RowSpecification</a> row);
   unsigned long <a href="#getchildatposition" title=dom-provider-getChildAtPosition>getChildAtPosition</a>(in <a href="#rowspecification">RowSpecification</a> parentRow, in unsigned long position);
@@ -23996,7 +23918,7 @@
   <pre
    class=idl>interface <dfn id=datagridselection>DataGridSelection</dfn> {
   readonly attribute unsigned long <span title=dom-DataGridSelection-count>length</span>;
-  <a href="#rowspecification">RowSpecification</a> <span title=dom-DataGridSelection->item</span>(in unsigned long index);
+  [IndexGetter] <a href="#rowspecification">RowSpecification</a> <span title=dom-DataGridSelection->item</span>(in unsigned long index);
   boolean <a href="#isselected" title=dom-DataGridSelection-isSelected>isSelected</a>(in <a href="#rowspecification">RowSpecification</a> row);
   void <a href="#setselected" title=dom-DataGridSelection-setSelected>setSelected</a>(in <a href="#rowspecification">RowSpecification</a> row, in boolean selected);
 <!--  void <span title="dom-DataGridSelection-addRange">addRange</span>(in <span>RowSpecification</span> first, in <span>RowSpecification</span> last);
@@ -24838,8 +24760,11 @@
    define a command also implements the <code title=command-ro><a
    href="#command2">Command</a></code> interface:
 
+  <p class=big-issue>Actually even better would be to just mix it straight
+   into those interfaces somehow.
+
   <pre
-   class=idl>interface <dfn id=command2 title=command-ro>Command</dfn> {<!--
+   class=idl>[NoInterfaceObject] interface <dfn id=command2 title=command-ro>Command</dfn> {<!--
  NOTE: to avoid clashing with the HTMLCommandElement interface's names,
        the members of this interface use cross-references with the title
        dom-command-ro-foo (note the "ro", which stands for "readonly").
@@ -26494,12 +26419,12 @@
    title="default view">default views</a> must also implement the <code><a
    href="#window">Window</a></code> object.
 
-  <pre class=idl>interface <dfn id=window>Window</dfn> {
+  <pre class=idl>[NoInterfaceObject] interface <dfn id=window>Window</dfn> {
   // the current browsing context
   readonly attribute <a href="#window">Window</a> <a href="#window0" title=dom-window>window</a>;
   readonly attribute <a href="#window">Window</a> <a href="#self" title=dom-self>self</a>;
            attribute DOMString <a href="#name3" title=dom-name>name</a>;
-  readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</a>;
+  [PutForwards=href] readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</a>;
   readonly attribute <a href="#history1">History</a> <a href="#history0" title=dom-history>history</a>;
   readonly attribute <a href="#undomanager">UndoManager</a> <a href="#undomanager0" title=dom-undoManager>undoManager</a>;
   <a href="#selection1">Selection</a> <a href="#getselection" title=dom-getSelection>getSelection</a>();
@@ -26520,6 +26445,7 @@
   // other browsing contexts
   readonly attribute <a href="#window">Window</a> <a href="#frames" title=dom-frames>frames</a>;
   readonly attribute unsigned long <a href="#length5" title=dom-length>length</a>;
+  [IndexGetter] <a href="#window">Window</a> <a href="#xxx4index" title=dom-XXX4>XXX4</a>(in unsigned long index);
   readonly attribute <a href="#window">Window</a> <a href="#opener0" title=dom-opener>opener</a>;
   <a href="#window">Window</a> <a href="#open2" title=dom-open>open</a>();
   <a href="#window">Window</a> <a href="#open2" title=dom-open>open</a>(in DOMString url);
@@ -26565,8 +26491,7 @@
            attribute <span>EventListener</span> <a href="#onsubmit" title=handler-onsubmit>onsubmit</a>;
            attribute <span>EventListener</span> <a href="#onunload" title=handler-onunload>onunload</a>;
 };</pre>
-  <!-- XXX XMLHttpRequest
-          http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
+  <!-- XXX http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
           http://www.mozilla.org/docs/dom/domref/dom_window_ref.html
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.idl
    -->
@@ -26589,9 +26514,9 @@
   <p>Objects implementing the <code><a href="#window">Window</a></code>
    interface must also implement the <code>EventTarget</code> interface.
 
-  <p class=note><code><a href="#window">Window</a></code> objects also <a
-   href="#get" title=dom-item>have an implicit [[Get]] method</a> which
-   returns <span>nested browsing contexts</span>.
+  <p class=note><code><a href="#window">Window</a></code> objects also <span
+   title=dom-item>have an implicit [[Get]] method</span> which returns
+   <span>nested browsing contexts</span>.
 
   <h4 id=security2><span class=secno>4.2.1 </span>Security</h4>
 
@@ -26750,20 +26675,19 @@
   <h4 id=accessing><span class=secno>4.2.4 </span>Accessing other browsing
    contexts</h4>
 
-  <p>In ECMAScript implementations, objects that implement the <code><a
-   href="#window">Window</a></code> interface must have a <dfn id=get
-   title=dom-item>[[Get]]</dfn> method that, when invoked with a property
-   name that is a number <var title="">i</var>, returns the <var
-   title="">i</var>th <a href="#child">child browsing context</a> of the <a
-   href="#active" title="active document">active</a> <code>Document</code>,
-   sorted in document order of the elements nesting those browsing contexts.
-
   <p>The <dfn id=length5 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" title="child browsing context">child
    browsing contexts</a> of the <a href="#active" title="active
    document">active</a> <code>Document</code>.
 
+  <p>The <dfn id=xxx4index title=dom-XXX4><code>XXX4(<var
+   title="">index</var>)</code></dfn> method must return the <var
+   title="">index</var>th <a href="#child">child browsing context</a> of the
+   <a href="#active" title="active document">active</a>
+   <code>Document</code>, sorted in document order of the elements nesting
+   those browsing contexts.
+
   <h3 id=scripting><span class=secno>4.3 </span>Scripting</h3>
 
   <h4 id=running><span class=secno>4.3.1 </span>Running executable code</h4>
@@ -29855,19 +29779,6 @@
            attribute DOMString <a href="#hash" title=dom-location-hash>hash</a>;
 };</pre>
 
-  <p>In the ECMAScript DOM binding, objects implementing this interface must
-   stringify to the same value as the <code title=dom-location-href><a
-   href="#href5">href</a></code> attribute.
-
-  <p id=settingLocation>In the ECMAScript DOM binding, the <code
-   title="">location</code> members of the <code><a
-   href="#htmldocument">HTMLDocument</a></code> and <code><a
-   href="#window">Window</a></code> interfaces behave as if they had a
-   setter: user agents must treat attempts to set these <code
-   title="">location</code> attributes as attempts at setting the <code
-   title=dom-location-href><a href="#href5">href</a></code> attribute of the
-   relevant <code><a href="#location2">Location</a></code> object instead.
-
   <p>The <dfn id=href5 title=dom-location-href><code>href</code></dfn>
    attribute returns the address of the page represented by the associated
    <code>Document</code> object, as an absolute IRI reference.
@@ -31431,10 +31342,10 @@
   <pre class=idl>
 interface <dfn id=storage0>Storage</dfn> {
   readonly attribute unsigned long <a href="#length8" title=dom-Storage-length>length</a>;
-  DOMString <a href="#keyn" title=dom-Storage-key>key</a>(in unsigned long index);
-  DOMString <a href="#getitem" title=dom-Storage-getItem>getItem</a>(in DOMString key);
-  void <a href="#setitem" title=dom-Storage-setItem>setItem</a>(in DOMString key, in DOMString data);
-  void <a href="#removeitem" title=dom-Storage-removeItem>removeItem</a>(in DOMString key);
+  [IndexGetter] DOMString <a href="#keyn" title=dom-Storage-key>key</a>(in unsigned long index);
+  [NameGetter] DOMString <a href="#getitem" title=dom-Storage-getItem>getItem</a>(in DOMString key);
+  [NameSetter] void <a href="#setitem" title=dom-Storage-setItem>setItem</a>(in DOMString key, in DOMString data);
+  [XXX] void <a href="#removeitem" title=dom-Storage-removeItem>removeItem</a>(in DOMString key); <!-- XXX [[Delete]] -->
 };</pre>
   <!-- XXX v2 ideas:
     a getInfo() method that returns an object that tells you:
@@ -31531,21 +31442,6 @@
    data storage area must either be successful, or the data storage area must
    not be changed at all.
 
-  <p>In the ECMAScript DOM binding, enumerating a <code><a
-   href="#storage0">Storage</a></code> object must enumerate through the
-   currently stored keys in the list the object is associated with. (It must
-   not enumerate the values or the actual members of the interface). In the
-   ECMAScript DOM binding, <code><a href="#storage0">Storage</a></code>
-   objects must support dereferencing such that getting a property that is
-   not a member of the object (i.e. is neither a member of the <code><a
-   href="#storage0">Storage</a></code> interface nor of <code
-   title=dom-Object>Object</code>) must invoke the <code
-   title=dom-Storage-getItem><a href="#getitem">getItem()</a></code> method
-   with the property's name as the argument, and setting such a property must
-   invoke the <code title=dom-Storage-setItem><a
-   href="#setitem">setItem()</a></code> method with the property's name as
-   the first argument and the given value as the second argument.
-
   <h4 id=the-sessionstorage><span class=secno>4.10.3 </span>The <code
    title=dom-sessionStorage><a
    href="#sessionstorage">sessionStorage</a></code> attribute</h4>
@@ -32229,7 +32125,7 @@
   <pre
    class=idl>interface <dfn id=sqlresultsetrowlist>SQLResultSetRowList</dfn> {
   readonly attribute unsigned long <a href="#length9" title=dom-SQLResultSetRowList-length>length</a>;
-  <span>DOMObject</span> <a href="#itemindex5" title=dom-SQLResultSetRowList-item>item</a>(in unsigned long index);
+  [IndexGetter] <span>DOMObject</span> <a href="#itemindex5" title=dom-SQLResultSetRowList-item>item</a>(in unsigned long index);
 };</pre>
 
   <p><code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code>
@@ -35511,10 +35407,10 @@
 
   <pre class=idl>interface <dfn id=undomanager>UndoManager</dfn> {
   unsigned long <a href="#adddata" title=dom-UndoManager-add>add</a>(in DOMObject data, in DOMStrong title);
-  void <a href="#remove2" title=dom-UndoManager-remove>remove</a>(in unsigned long index);
+  [XXX] void <a href="#remove2" title=dom-UndoManager-remove>remove</a>(in unsigned long index); <!-- XX [[Delete]] -->
   void <a href="#clearundo" title=dom-UndoManager-clearUndo>clearUndo</a>();
   void <a href="#clearredo" title=dom-UndoManager-clearRedo>clearRedo</a>();
-  DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index);
+  [IndexGetter] DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index);
   readonly attribute unsigned long <a href="#length10" title=dom-UndoManager-length>length</a>;
   readonly attribute unsigned long <a href="#position0" title=dom-UndoManager-position>position</a>;
 };</pre>
@@ -35526,13 +35422,6 @@
    interface for that <code><a href="#window">Window</a></code> object's
    associated <code><a href="#htmldocument">HTMLDocument</a></code> object.
 
-  <p>In the ECMAScript DOM binding, objects implementing this interface must
-   also support being dereferenced using the square bracket notation, such
-   that dereferencing with an integer index is equivalent to invoking the
-   <code title=dom-UndoManager-item><a href="#itemn">item()</a></code> method
-   with that index (e.g. <code title="">undoManager[1]</code> returns the
-   same as <code title="">undoManager.item(1)</code>).
-
   <p><code><a href="#undomanager">UndoManager</a></code> objects represent
    their document's <a href="#undo-transaction">undo transaction history</a>.
    Only <a href="#undo-object">undo object</a> entries are visible with this
@@ -35837,7 +35726,8 @@
    must return the same <code><a href="#selection1">Selection</a></code>
    object.
 
-  <pre class=idl>interface <dfn id=selection1>Selection</dfn> {
+  <pre
+   class=idl>[<a href="#stringinfy" title=dom-selection-toString>Stringifies</a>] interface <dfn id=selection1>Selection</dfn> {
   readonly attribute Node <a href="#anchornode" title=dom-selection-anchorNode>anchorNode</a>;
   readonly attribute long <a href="#anchoroffset" title=dom-selection-anchorOffset>anchorOffset</a>;
   readonly attribute Node <a href="#focusnode" title=dom-selection-focusNode>focusNode</a>;
@@ -35853,7 +35743,6 @@
   void <a href="#addrange" title=dom-selection-addRange>addRange</a>(in Range range);
   void <a href="#removerange" title=dom-selection-removeRange>removeRange</a>(in Range range);
   void <a href="#removeallranges" title=dom-selection-removeAllRanges>removeAllRanges</a>();
-  DOMString <a href="#tostring" title=dom-selection-toString>toString</a>();
 };</pre>
   <!--
   See also:
@@ -35980,8 +35869,8 @@
    title="">range</var> Range object to the list of selections, at the end
    (so the newly added range is the new last range). Duplicates are not
    prevented; a range may be added more than once in which case it appears in
-   the list more than once, which (for example) will cause <code
-   title=dom-selection-toString><a href="#tostring">toString()</a></code> to
+   the list more than once, which (for example) will cause <a
+   href="#stringinfy" title=dom-selection-toString>stringification</a> to
    return the range's text twice.</p>
   <!-- XXX how does this interact with
   deleteFromDocument() which acts on all ranges? -->
@@ -36001,19 +35890,12 @@
    (and until a new range is added to the list, either through this interface
    or via user interaction).
 
-  <p>The <dfn id=tostring
-   title=dom-selection-toString><code>toString()</code></dfn> method must
-   return a concatenation of the results of invoking the <code
-   title="">toString()</code> method of the <code>Range</code> object on each
-   of the ranges of the selection, in the order they appear in the list
-   (first to last).
+  <p>Objects implementing this interface must <dfn id=stringinfy
+   title=dom-selection-toString>stringinfy</dfn> to a concatenation of the
+   results of invoking the <code title="">toString()</code> method of the
+   <code>Range</code> object on each of the ranges of the selection, in the
+   order they appear in the list (first to last).
 
-  <p>In language bindings where this is supported, objects implementing the
-   <code><a href="#selection1">Selection</a></code> interface must stringify
-   to the value returned by the object's <code
-   title=dom-selection-toString><a href="#tostring">toString()</a></code>
-   method.
-
   <div class=example>
    <p>In the following document fragment, the emphasised parts indicate the
     selection.</p>
@@ -36439,7 +36321,7 @@
    <dd><strong>Value:</strong> Always the string "<code
     title="">false</code>".
 
-   <dt><dfn id=delete0 title=command-delete><code>delete</code></dfn>
+   <dt><dfn id=delete title=command-delete><code>delete</code></dfn>
 
    <dd><strong>Action:</strong> The user agent must act as if the user had
     performed <a href="#contenteditable-delete">a backspace operation</a>.
@@ -48749,7 +48631,7 @@
    in due course.
 
   <pre class=idl>
-interface <dfn id=windowtimers>WindowTimers</dfn> {
+[NoInterfaceObject] interface <dfn id=windowtimers>WindowTimers</dfn> {
   // timers
   long <a href="#settimeout">setTimeout</a>(in <a href="#timeouthandler">TimeoutHandler</a> handler, in long timeout);
   long <a href="#settimeout">setTimeout</a>(in <a href="#timeouthandler">TimeoutHandler</a> handler, in long timeout, <var title="">arguments...</var>);
@@ -48764,7 +48646,7 @@
 };
 
 interface <dfn id=timeouthandler>TimeoutHandler</dfn> {
-  void handleEvent(<var title="">arguments...</var>);
+  void handleEvent([Variadic] in any args);
 };
 </pre>
 
@@ -48772,6 +48654,9 @@
    be obtainable from any <code><a href="#window">Window</a></code> object
    using binding-specific casting methods.
 
+  <p class=big-issue>Actually even better would be to just mix it straight
+   into Window somehow.
+
   <p>The <code><a href="#settimeout">setTimeout</a></code> and <code><a
    href="#setinterval...">setInterval</a></code> methods allow authors to
    schedule timer-based events.
@@ -48787,18 +48672,6 @@
    were provided, they must be passed to the <var title="">handler</var> as
    arguments to the <code>handleEvent()</code> function.
 
-  <p>In the ECMAScript DOM binding, the ECMAScript native
-   <code>Function</code> type must implement the <code><a
-   href="#timeouthandler">TimeoutHandler</a></code> interface such that
-   invoking the <code>handleEvent()</code> method of that interface on the
-   object from another language binding invokes the function itself, with the
-   arguments passed to <code>handleEvent()</code> as the arguments passed to
-   the function. In the ECMAScript DOM binding itself, however, the
-   <code>handleEvent()</code> method of the interface is not directly
-   accessible on <code>Function</code> objects. Such functions must be called
-   in the scope of the <a href="#browsing0">browsing context</a> in which
-   they were created.
-
   <p>Alternatively, <dfn id=settimeout0 title=""><code>setTimeout(<var
    title="">code</var>, <var title="">timeout</var>[, <var
    title="">language</var>])</code></dfn> may be used. This variant takes a
@@ -48835,19 +48708,6 @@
   <p>Timeouts must never fire while another script is executing. (Thus the
    HTML scripting model is strictly single-threaded and not reentrant.)
 
-  <h3 id=events2><span class=secno>11.5 </span>Events</h3>
-
-  <p id=js-function-listener>In the ECMAScript DOM binding, the ECMAScript
-   native <code>Function</code> type must implement the
-   <code>EventListener</code> interface such that invoking the
-   <code>handleEvent()</code> method of that interface on the object from
-   another language binding invokes the function itself, with the
-   <code>event</code> argument as its only argument. In the ECMAScript
-   binding itself, however, the <code>handleEvent()</code> method of the
-   interface is not directly accessible on <code>Function</code> objects.
-   Such functions, when invoked, must be called in the scope of the <a
-   href="#browsing0">browsing context</a> that they were created in.
-
   <h2 class=no-num id=references>References</h2>
 
   <p class=big-issue>This section will be written in a future
@@ -49712,15 +49572,7 @@
 
 
 
-  <p>In the ECMAScript DOM binding, objects implementing this interface
-  can also be dereferenced using square bracket notation (e.g.
-  <code>foo[1]</code> or <code>foo["bar"]</code>). Dereferencing with
-  an integer index is equivalent to invoking the <code>item()</code>
-  method with that index, and dereferencing with a string index is
-  equivalent to invoking the <code>namedItem()</code> method with that
-  index.</p>
 
-
 "you have mail": bubble notification; flash taskbar button, 
 => how do you stop advertisers?
 

Modified: source
===================================================================
--- source	2008-04-10 21:50:13 UTC (rev 1429)
+++ source	2008-04-11 04:28:06 UTC (rev 1430)
@@ -516,43 +516,25 @@
   title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
   raised.</p>
 
-  <p>Unless other specified, if a DOM attribute that is a signed
-  numeric type is assigned a negative value, a <code
-  title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
-  raised.</p>
-
   <p>Unless other specified, if a method with an argument that is a
   floating point number type (<code title="">float</code>) is passed
   an Infinity or Not-a-Number value, a <code
   title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
   raised.</p>
 
+  <!-- XXX DOMB -->
   <p>Unless other specified, if a method is passed fewer
   arguments than is defined for that method in its IDL definition,
   a <code title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
   raised.</p>
 
+  <!-- XXX DOMB -->
   <p>Unless other specified, if a method is passed more arguments than
   is defined for that method in its IDL definition, the excess
   arguments must be ignored.</p> <!-- XXX When updating this spec for
   Bindings-For-DOM-compliance, also remove or consider the equivalent
   requirement in the canvas section for toDataURL() and
   getContext(). -->
-
-  <p>Unless other specified, if a method is expecting, as one of its
-  arguments, as defined by its IDL definition, an object implementing
-  a particular interface <var title="">X</var>, and the argument
-  passed is an object whose [[Class]] property is neither that
-  interface <var title="">X</var>, nor the name of an interface <var
-  title="">Y</var> where this specification requires that all objects
-  implementing interface <var title="">Y</var> also implement
-  interface <var title="">X</var>, nor the name of an interface that
-  inherits from the expected interface <var title="">X</var>, then a
-  <code title="">TYPE_MISMATCH_ERR</code> exception must be
-  raised.</p>
-
-  <p class="big-issue">Anything else? Passing the wrong type of
-  object, maybe? Implied conversions to int/float?</p>
   
 
   <h4>Dependencies</h4>
@@ -608,9 +590,9 @@
 
     <p>Implementations that use ECMAScript to implement the APIs
     defined in this specification must implement them in a manner
-    consistent with the ECMAScript Bindings for DOM Specifications
+    consistent with the ECMAScript Bindings defined in the Web IDL
     specification, as this specification uses that specification's
-    terminology. <a href="#refsEBFD">[EBFD]</a></p>
+    terminology. <a href="#refsWebIDL">[WebIDL]</a></p>
 
    </dd>
 
@@ -772,28 +754,10 @@
   imply a visual medium; they must be considered to apply to other
   media in equivalent ways.</p>
 
-  <p>Various DOM interfaces are defined in this specification using
-  pseudo-IDL. This looks like OMG IDL but isn't. For instance, method
-  overloading is used, and types from the W3C DOM specifications are
-  used without qualification. Language-specific bindings for these
-  abstract interface definitions must be derived in the way consistent
-  with W3C DOM specifications. Some interface-specific binding
-  information for ECMAScript is included in this specification.</p>
+  <p>DOM interfaces defined in this specification use Web IDL. User
+  agents must implement these interfaces as defined by the Web IDL
+  specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
 
-  <p class="big-issue">The current situation with IDL blocks is
-  pitiful. IDL is totally inadequate to properly represent what
-  objects have to look like in JS; IDL can't say if a member is
-  enumerable, what the indexing behaviour is, what the stringification
-  behaviour is, what behaviour setting a member whose type is a
-  particular interface should be (e.g. setting of document.location or
-  element.className), what constructor an object implementing an
-  interface should claim to have, how overloads work, etc. I think we
-  should make the IDL blocks non-normative, and/or replace them with
-  something else that is better for JS while still being clear on how
-  it applies to other languages. However, we do need to have something
-  that says what types the methods take as arguments, since we have to
-  raise exceptions if they are wrong.</p>
-
   <p>The construction "a <code>Foo</code> object", where
   <code>Foo</code> is actually an interface, is sometimes used instead
   of the more accurate "an object implementing the interface
@@ -801,7 +765,8 @@
 
   <p>A DOM attribute is said to be <em>getting</em> when its value is
   being retrieved (e.g. by author script), and is said to be
-  <em>setting</em> when a new value is assigned to it.</p>
+  <em>setting</em> when a new value is assigned to it.</p> <!-- XXX
+  define this in terms of [[Get]] and [[Put]] ? -->
 
   <p>If a DOM object is said to be <dfn>live</dfn>, then that means
   that any attributes returning that object must always return the
@@ -827,6 +792,7 @@
   paused, however.</p>
 
 
+
   <h4>HTML vs XHTML</h4>
 
   <p><em>This section is non-normative.</em></p>
@@ -932,7 +898,7 @@
 
   <pre class="idl">interface <dfn>HTMLDocument</dfn> {
   // <span>Resource metadata management</span>
-  readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
+  [PutForwards=href] readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
   readonly attribute DOMString <span title="dom-document-URL">URL</span>;
            attribute DOMString <span title="dom-document-domain">domain</span>;
   readonly attribute DOMString <span title="dom-document-referrer">referrer</span>;
@@ -1445,8 +1411,8 @@
 
   <pre class="idl">interface <dfn>HTMLCollection</dfn> {
   readonly attribute unsigned long <span title="dom-HTMLCollection-length">length</span>;
-  Element <span title="dom-HTMLCollection-item">item</span>(in unsigned long index);
-  Element <span title="dom-HTMLCollection-namedItem">namedItem</span>(in DOMString name);
+  [IndexGetter] Element <span title="dom-HTMLCollection-item">item</span>(in unsigned long index);
+  [NameGetter] Element <span title="dom-HTMLCollection-namedItem">namedItem</span>(in DOMString name);
 };</pre>
 
   <p>The <dfn
@@ -1484,17 +1450,8 @@
   <p>If no such elements are found, then the method must return
   null.</p>
 
-  <p>In ECMAScript implementations, objects that implement the
-  <code>HTMLCollection</code> interface must also have a [[Get]]
-  method that, when invoked with a property name that is a number,
-  acts like the <code title="dom-HTMLCollection-item">item()</code>
-  method would when invoked with that argument, and when invoked with
-  a property name that is a string, acts like the <code
-  title="dom-HTMLCollection-namedItem">namedItem()</code> method would
-  when invoked with that argument.</p>
 
 
-
   <h5>HTMLFormControlsCollection</h5>
 
   <p>The <code>HTMLFormControlsCollection</code> interface represents
@@ -1502,8 +1459,8 @@
 
   <pre class="idl">interface <dfn>HTMLFormControlsCollection</dfn> {
   readonly attribute unsigned long <span title="dom-HTMLFormControlsCollection-length">length</span>;
-  <span>HTMLElement</span> <span title="dom-HTMLFormControlsCollection-item">item</span>(in unsigned long index);
-  Object <span title="dom-HTMLFormControlsCollection-namedItem">namedItem</span>(in DOMString name);
+  [IndexGetter] <span>HTMLElement</span> <span title="dom-HTMLFormControlsCollection-item">item</span>(in unsigned long index);
+  [NameGetter] Object <span title="dom-HTMLFormControlsCollection-namedItem">namedItem</span>(in DOMString name);
 };</pre>
 
   <p>The <dfn
@@ -1548,17 +1505,7 @@
 
   </ol>
 
-  <p>In the ECMAScript DOM binding, objects implementing the
-  <code>HTMLFormControlsCollection</code> interface must support being
-  dereferenced using the square bracket notation, such that
-  dereferencing with an integer index is equivalent to invoking the
-  <code title="dom-HTMLFormControlsCollection-item">item()</code>
-  method with that index, and such that dereferencing with a string
-  index is equivalent to invoking the <code
-  title="dom-HTMLFormControlsCollection-namedItem">namedItem()</code>
-  method with that index.</p>
 
-
 <!--
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E...%0A%3Cform%20name%3D%22a%22%3E%3Cinput%20id%3D%22x%22%20name%3D%22y%22%3E%3Cinput%20name%3D%22x%22%20id%3D%22y%22%3E%3C/form%3E%0A%3Cscript%3E%0A%20%20var%20x%3B%0A%20%20w%28x%20%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20x%5B0%5D.parentNode.removeChild%28x%5B0%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20w%28x%20%3D%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%3C/script%3E%0A
 -->
@@ -1571,8 +1518,8 @@
 
   <pre class="idl">interface <dfn>HTMLOptionsCollection</dfn> {
            attribute unsigned long <span title="dom-HTMLOptionsCollection-length">length</span>;
-  HTMLOptionElement <span title="dom-HTMLOptionsCollection-item">item</span>(in unsigned long index);
-  Object <span title="dom-HTMLOptionsCollection-namedItem">namedItem</span>(in DOMString name);
+  [IndexGetter] HTMLOptionElement <span title="dom-HTMLOptionsCollection-item">item</span>(in unsigned long index);
+  [NameGetter] Object <span title="dom-HTMLOptionsCollection-namedItem">namedItem</span>(in DOMString name);
 };</pre>
 
   <p>On getting, the <dfn
@@ -1637,16 +1584,6 @@
 
   </ol>
 
-  <p>In the ECMAScript DOM binding, objects implementing the
-  <code>HTMLOptionsCollection</code> interface must support being
-  dereferenced using the square bracket notation, such that
-  dereferencing with an integer index is equivalent to invoking the
-  <code title="dom-HTMLOptionsCollection-item">item()</code>
-  method with that index, and such that dereferencing with a string
-  index is equivalent to invoking the <code
-  title="dom-HTMLOptionsCollection-namedItem">namedItem()</code>
-  method with that index.</p>
-
   <!-- see also http://ln.hixie.ch/?start=1161042744&count=1 -->
 
   <p class="big-issue">We may want to add <code>add()</code> and
@@ -1670,9 +1607,9 @@
   passed to an author-implemented callback in the
   <code>datagrid</code> APIs).</p>
 
-  <pre class="idl">interface <dfn>DOMTokenList</dfn> {
+  <pre class="idl">[<span title="dom-tokenlist-toString">Stringifies</span>] interface <dfn>DOMTokenList</dfn> {
   readonly attribute unsigned long <span title="dom-tokenlist-length">length</span>;
-  DOMString <span title="dom-tokenlist-item">item</span>(in unsigned long index);
+  [IndexGetter] DOMString <span title="dom-tokenlist-item">item</span>(in unsigned long index);
   boolean <span title="dom-tokenlist-has">has</span>(in DOMString token);
   void <span title="dom-tokenlist-add">add</span>(in DOMString token);
   void <span title="dom-tokenlist-remove">remove</span>(in DOMString token);
@@ -1695,13 +1632,7 @@
   title="">index</var> is equal to or greater than the number of
   tokens, then the method must return null.</p>
 
-  <p>In ECMAScript implementations, objects that implement the
-  <code>DOMTokenList</code> interface must also have a [[Get]] method
-  that, when invoked with a property name that is a number, acts like
-  the <code title="dom-tokenlist-item">item()</code> method would when
-  invoked with that argument.</p>
 
-
   <p>The <dfn title="dom-tokenlist-has"><code>has(<var
   title="">token</var>)</code></dfn> method must run the following
   algorithm:</p>
@@ -1804,8 +1735,8 @@
 
   </ol>
 
-  <p>In the ECMAScript DOM binding, objects implementing the
-  <code>DOMTokenList</code> interface must stringify to the object's
+  <p>Objects implementing the <code>DOMTokenList</code> interface must
+  <dfn title="dom-tokenlist-toString">stringify</dfn> to the object's
   underlying string representation.</p>
 
 
@@ -1818,28 +1749,28 @@
   for deleting names.</p>
 
   <p class="big-issue">The names of the methods on this interface are
-  temporary and will be fixed when the "Language Bindings for DOM
-  Specifications" spec is ready to handle this case.</p>
+  temporary and will be fixed when the Web IDL / "Language Bindings
+  for DOM Specifications" spec is ready to handle this case.</p>
 
   <pre class="idl">interface <dfn>DOMStringMap</dfn> {
-  DOMString <span title="dom-stringmap-[[Get]]">[[Get]]</span>(in DOMString name);
-  void <span title="dom-stringmap-[[Put]]">[[Put]]</span>(in DOMString name, in DOMString value);
-  bool <span title="dom-stringmap-[[Delete]]">[[Delete]]</span>(in DOMString name);
+  [NameGetter] DOMString <span title="dom-stringmap-XXX1">XXX1</span>(in DOMString name);
+  [NameSetter] void <span title="dom-stringmap-XXX2">XXX2</span>(in DOMString name, in DOMString value);
+  [XXX] bool <span title="dom-stringmap-XXX3">XXX3</span>(in DOMString name);
 };</pre>
 
-  <p>The <dfn title="dom-stringmap-[[Get]]"><code>[[Get]](<var
+  <p>The <dfn title="dom-stringmap-XXX1"><code>XXX1(<var
   title="">name</var>)</code></dfn> method must call the algorithm for
   getting values from names, passing <var title="">name</var> as the
   name, and must return the corresponding value, or null if <var
   title="">name</var> has no corresponding value.</p>
 
-  <p>The <dfn title="dom-stringmap-[[Put]]"><code>[[Put]](<var
+  <p>The <dfn title="dom-stringmap-XXX2"><code>XXX2(<var
   title="">name</var>, <var title="">value</var>)</code></dfn> method
   must call the algorithm for setting names to certain values, passing
   <var title="">name</var> as the name and <var title="">value</var>
   as the value.</p>
 
-  <p>The <dfn title="dom-stringmap-[[Delete]]"><code>[[Delete]](<var
+  <p>The <dfn title="dom-stringmap-XXX3"><code>XXX3(<var
   title="">name</var>)</code></dfn> method must call the algorithm for
   deleting names, passing <var title="">name</var> as the name, and
   must return true.</p>
@@ -5474,7 +5405,10 @@
   that implement the <code>Document</code> interface using
   binding-specific casting methods.</p>
 
-  <pre class="idl">interface <dfn>DocumentFocus</dfn> {
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into those interfaces somehow.</p>
+
+  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
   void moveFocusForward();
   void moveFocusBackward();
   void moveFocusUp();
@@ -8562,7 +8496,7 @@
    <dd><code title="attr-hyperlink-type">type</code></dd>
    <dt>DOM interface:</dt>
    <dd>
-<pre class="idl">interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
+<pre class="idl">[Stringifies=href] interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
            attribute DOMString <span title="dom-a-href">href</span>;
            attribute DOMString <span title="dom-a-target">target</span>;
            attribute DOMString <span title="dom-a-ping">ping</span>;
@@ -8571,7 +8505,7 @@
            attribute DOMString <span title="dom-a-media">media</span>;
            attribute DOMString <span title="dom-a-hreflang">hreflang</span>;
            attribute DOMString <span title="dom-a-type">type</span>;
-};</pre>
+};</pre><!-- XXX also support the URI decomposition attributes -->
     <p>The <code title="command-ro">Command</code> interface must also be implemented by
     this element.</p>
    </dd>
@@ -13942,8 +13876,8 @@
   </ol>
 
 
-  <!-- XXX the remainder of this subsection will be removed once we
-  have a way to mark up callbacks in IDL -->
+  <!-- XXX the remainder of this subsection may be removed if we ever
+  get a way to mark up callbacks in IDL -->
 
   <p>Invoking a callback (an object implementing the
   <code>VoidCallback</code> interface) means calling its <code
@@ -13960,19 +13894,7 @@
   interface is the entrypoint for the callback represented by the
   object.</p>
 
-  <p>In the ECMAScript DOM binding, the ECMAScript native
-  <code>Function</code> type must implement the
-  <code>VoidCallback</code> interface such that invoking the
-  <code>handleEvent()</code> method of that interface on the object
-  from another language binding invokes the function itself. In the
-  ECMAScript binding itself, however, the <code>handleEvent()</code>
-  method of the interface is not directly accessible on
-  <code>Function</code> objects. Such functions, when invoked, must be
-  called at the scope of the <span>browsing context</span>.</p> <!--
-  XXX if you change this make sure to also look up the other mentions
-  of handleEvent() in this file -->
 
-
   <h5>User interface</h5>
 
   <p>The <dfn title="attr-media-controls"><code>controls</code></dfn>
@@ -20037,7 +19959,7 @@
   represented by objects that implement the
   <span>RowSpecification</span> interface.</p>
 
-  <pre class="idl">interface <dfn>RowSpecification</dfn> {
+  <pre class="idl">[NoInterfaceObject] interface <dfn>RowSpecification</dfn> {
   // binding-specific interface
 };</pre>
 
@@ -20069,7 +19991,7 @@
   (and most commonly) the content author's implementation(s).</em></p>
 
   <pre class="idl">// To be implemented by Web authors as a JS object
-interface <dfn>DataGridDataProvider</dfn> {
+[NoInterfaceObject] interface <dfn>DataGridDataProvider</dfn> {
   void <span title="dom-provider-initialize">initialize</span>(in HTMLDataGridElement datagrid);
   unsigned long <span title="dom-provider-getRowCount">getRowCount</span>(in <span>RowSpecification</span> row);
   unsigned long <span title="dom-provider-getChildAtPosition">getChildAtPosition</span>(in <span>RowSpecification</span> parentRow, in unsigned long position);
@@ -21704,7 +21626,7 @@
 
   <pre class="idl">interface <dfn>DataGridSelection</dfn> {
   readonly attribute unsigned long <span title="dom-DataGridSelection-count">length</span>;
-  <span>RowSpecification</span> <span title="dom-DataGridSelection-">item</span>(in unsigned long index);
+  [IndexGetter] <span>RowSpecification</span> <span title="dom-DataGridSelection-">item</span>(in unsigned long index);
   boolean <span title="dom-DataGridSelection-isSelected">isSelected</span>(in <span>RowSpecification</span> row);
   void <span title="dom-DataGridSelection-setSelected">setSelected</span>(in <span>RowSpecification</span> row, in boolean selected);
 <!--  void <span title="dom-DataGridSelection-addRange">addRange</span>(in <span>RowSpecification</span> first, in <span>RowSpecification</span> last);
@@ -22505,10 +22427,13 @@
   </dl>
 
   <p>Commands are represented by elements in the DOM. Any element that
-  can define a command also implements the <code title="command-ro">Command</code>
-  interface:</p>
+  can define a command also implements the <code
+  title="command-ro">Command</code> interface:</p>
 
-  <pre class="idl">interface <dfn title="command-ro">Command</dfn> {<!--
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into those interfaces somehow.</p>
+
+  <pre class="idl">[NoInterfaceObject] interface <dfn title="command-ro">Command</dfn> {<!--
  NOTE: to avoid clashing with the HTMLCommandElement interface's names,
        the members of this interface use cross-references with the title
        dom-command-ro-foo (note the "ro", which stands for "readonly").
@@ -24145,12 +24070,12 @@
   view">default views</span> must also implement the
   <code>Window</code> object.</p>
 
-  <pre class="idl">interface <dfn>Window</dfn> {
+  <pre class="idl">[NoInterfaceObject] 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>;
            attribute DOMString <span title="dom-name">name</span>;
-  readonly attribute <span>Location</span> <span title="dom-document-location">location</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>;
   readonly attribute <span>UndoManager</span> <span title="dom-undoManager">undoManager</span>;
   <span>Selection</span> <span title="dom-getSelection">getSelection</span>();
@@ -24171,6 +24096,7 @@
   // other browsing contexts
   readonly attribute <span>Window</span> <span title="dom-frames">frames</span>;
   readonly attribute unsigned long <span title="dom-length">length</span>;
+  [IndexGetter] <span>Window</span> <span title="dom-XXX4">XXX4</span>(in unsigned long index);
   readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
   <span>Window</span> <span title="dom-open">open</span>();
   <span>Window</span> <span title="dom-open">open</span>(in DOMString url);
@@ -24217,8 +24143,7 @@
            attribute <span>EventListener</span> <span title="handler-onunload">onunload</span>;
 };</pre>
 
- <!-- XXX XMLHttpRequest
-          http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
+ <!-- XXX http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
           http://www.mozilla.org/docs/dom/domref/dom_window_ref.html
           http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.idl
    -->
@@ -24397,23 +24322,21 @@
 
   <h4>Accessing other browsing contexts</h4>
 
-  <p>In ECMAScript implementations, objects that implement the
-  <code>Window</code> interface must have a <dfn
-  title="dom-item">[[Get]]</dfn> method that, when invoked with a
-  property name that is a number <var title="">i</var>, returns the
-  <var title="">i</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>
-
   <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>
 
+  <p>The <dfn title="dom-XXX4"><code>XXX4(<var
+  title="">index</var>)</code></dfn> method must return 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>
 
 
+
   <h3 id="scripting">Scripting</h3>
 
   <h4>Running executable code</h4>
@@ -27562,18 +27485,6 @@
            attribute DOMString <span title="dom-location-hash">hash</span>;
 };</pre>
 
-  <p>In the ECMAScript DOM binding, objects implementing this
-  interface must stringify to the same value as the <code
-  title="dom-location-href">href</code> attribute.</p>
-
-  <p id="settingLocation">In the ECMAScript DOM binding, the <code
-  title="">location</code> members of the <code>HTMLDocument</code>
-  and <code>Window</code> interfaces behave as if they had a setter:
-  user agents must treat attempts to set these <code
-  title="">location</code> attributes as attempts at setting the <code
-  title="dom-location-href">href</code> attribute of the relevant
-  <code>Location</code> object instead.</p>
-
   <p>The <dfn title="dom-location-href"><code>href</code></dfn>
   attribute returns the address of the page represented by the
   associated <code>Document</code> object, as an absolute IRI
@@ -29081,10 +28992,10 @@
   <pre class="idl">
 interface <dfn>Storage</dfn> {
   readonly attribute unsigned long <span title="dom-Storage-length">length</span>;
-  DOMString <span title="dom-Storage-key">key</span>(in unsigned long index);
-  DOMString <span title="dom-Storage-getItem">getItem</span>(in DOMString key);
-  void <span title="dom-Storage-setItem">setItem</span>(in DOMString key, in DOMString data);
-  void <span title="dom-Storage-removeItem">removeItem</span>(in DOMString key);
+  [IndexGetter] DOMString <span title="dom-Storage-key">key</span>(in unsigned long index);
+  [NameGetter] DOMString <span title="dom-Storage-getItem">getItem</span>(in DOMString key);
+  [NameSetter] void <span title="dom-Storage-setItem">setItem</span>(in DOMString key, in DOMString data);
+  [XXX] void <span title="dom-Storage-removeItem">removeItem</span>(in DOMString key); <!-- XXX [[Delete]] -->
 };</pre>
 
   <!-- XXX v2 ideas:
@@ -29177,21 +29088,7 @@
   area must either be successful, or the data storage area must not be
   changed at all.</p>
 
-  <p>In the ECMAScript DOM binding, enumerating a <code>Storage</code>
-  object must enumerate through the currently stored keys in the list
-  the object is associated with. (It must not enumerate the values or
-  the actual members of the interface). In the ECMAScript DOM binding,
-  <code>Storage</code> objects must support dereferencing such that
-  getting a property that is not a member of the object (i.e. is
-  neither a member of the <code>Storage</code> interface nor of <code
-  title="dom-Object">Object</code>) must invoke the <code
-  title="dom-Storage-getItem">getItem()</code> method with the
-  property's name as the argument, and setting such a property must
-  invoke the <code title="dom-Storage-setItem">setItem()</code> method
-  with the property's name as the first argument and the given value
-  as the second argument.</p>
 
-
   <h4>The <code title="dom-sessionStorage">sessionStorage</code> attribute</h4>
 
   <p>The <dfn
@@ -29918,7 +29815,7 @@
 
   <pre class="idl">interface <dfn>SQLResultSetRowList</dfn> {
   readonly attribute unsigned long <span title="dom-SQLResultSetRowList-length">length</span>;
-  <span>DOMObject</span> <span title="dom-SQLResultSetRowList-item">item</span>(in unsigned long index);
+  [IndexGetter] <span>DOMObject</span> <span title="dom-SQLResultSetRowList-item">item</span>(in unsigned long index);
 };</pre>
 
   <p><code>SQLResultSetRowList</code> objects have a <dfn
@@ -33042,10 +32939,10 @@
 
   <pre class="idl">interface <dfn>UndoManager</dfn> {
   unsigned long <span title="dom-UndoManager-add">add</span>(in DOMObject data, in DOMStrong title);
-  void <span title="dom-UndoManager-remove">remove</span>(in unsigned long index);
+  [XXX] void <span title="dom-UndoManager-remove">remove</span>(in unsigned long index); <!-- XX [[Delete]] -->
   void <span title="dom-UndoManager-clearUndo">clearUndo</span>();
   void <span title="dom-UndoManager-clearRedo">clearRedo</span>();
-  DOMObject <span title="dom-UndoManager-item">item</span>(in unsigned long index);
+  [IndexGetter] DOMObject <span title="dom-UndoManager-item">item</span>(in unsigned long index);
   readonly attribute unsigned long <span title="dom-UndoManager-length">length</span>;
   readonly attribute unsigned long <span title="dom-UndoManager-position">position</span>;
 };</pre>
@@ -33056,14 +32953,6 @@
   <code>Window</code> object's associated
   <code>HTMLDocument</code> object.</p>
 
-  <p>In the ECMAScript DOM binding, objects implementing this interface
-  must also support being dereferenced using the square bracket
-  notation, such that dereferencing with an integer index is
-  equivalent to invoking the <code
-  title="dom-UndoManager-item">item()</code> method with that index
-  (e.g. <code title="">undoManager[1]</code> returns the same as <code
-  title="">undoManager.item(1)</code>).</p>
-
   <p><code>UndoManager</code> objects represent their document's
   <span>undo transaction history</span>. Only <span>undo object</span>
   entries are visible with this API, but this does not mean that
@@ -33361,7 +33250,7 @@
   method on the <code>HTMLDocument</code> interface must return the
   same <code>Selection</code> object.</p>
                                    
-  <pre class="idl">interface <dfn>Selection</dfn> {
+  <pre class="idl">[<span title="dom-selection-toString">Stringifies</span>] interface <dfn>Selection</dfn> {
   readonly attribute Node <span title="dom-selection-anchorNode">anchorNode</span>;
   readonly attribute long <span title="dom-selection-anchorOffset">anchorOffset</span>;
   readonly attribute Node <span title="dom-selection-focusNode">focusNode</span>;
@@ -33377,7 +33266,6 @@
   void <span title="dom-selection-addRange">addRange</span>(in Range range);
   void <span title="dom-selection-removeRange">removeRange</span>(in Range range);
   void <span title="dom-selection-removeAllRanges">removeAllRanges</span>();
-  DOMString <span title="dom-selection-toString">toString</span>();
 };</pre>
 <!--
   See also:
@@ -33507,8 +33395,8 @@
   of selections, at the end (so the newly added range is the new last
   range). Duplicates are not prevented; a range may be added more than
   once in which case it appears in the list more than once, which (for
-  example) will cause <code
-  title="dom-selection-toString">toString()</code> to return the
+  example) will cause <span
+  title="dom-selection-toString">stringification</span> to return the
   range's text twice.</p> <!-- XXX how does this interact with
   deleteFromDocument() which acts on all ranges? -->
 
@@ -33526,18 +33414,12 @@
   method is invoked (and until a new range is added to the list,
   either through this interface or via user interaction).</p>
 
-  <p>The <dfn
-  title="dom-selection-toString"><code>toString()</code></dfn> method
-  must return a concatenation of the results of invoking the <code
-  title="">toString()</code> method of the <code>Range</code> object
-  on each of the ranges of the selection, in the order they appear in
-  the list (first to last).</p>
+  <p>Objects implementing this interface must <dfn
+  title="dom-selection-toString">stringinfy</dfn> to a concatenation
+  of the results of invoking the <code title="">toString()</code>
+  method of the <code>Range</code> object on each of the ranges of the
+  selection, in the order they appear in the list (first to last).</p>
 
-  <p>In language bindings where this is supported, objects
-  implementing the <code>Selection</code> interface must stringify to
-  the value returned by the object's <code
-  title="dom-selection-toString">toString()</code> method.</p>
-
   <div class="example">
    <p>In the following document fragment, the emphasised parts
    indicate the selection.</p>
@@ -43498,7 +43380,7 @@
   specification in due course.</p>
 
 <pre class="idl">
-interface <dfn>WindowTimers</dfn> {
+[NoInterfaceObject] interface <dfn>WindowTimers</dfn> {
   // timers
   long <span>setTimeout</span>(in <span>TimeoutHandler</span> handler, in long timeout);
   long <span>setTimeout</span>(in <span>TimeoutHandler</span> handler, in long timeout, <var title="">arguments...</var>);
@@ -43513,7 +43395,7 @@
 };
 
 interface <dfn>TimeoutHandler</dfn> {
-  void handleEvent(<var title="">arguments...</var>);
+  void handleEvent([Variadic] in any args);
 };
 </pre>
 
@@ -43521,6 +43403,9 @@
   any <code>Window</code> object using binding-specific casting
   methods.</p>
 
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into Window somehow.</p>
+
   <p>The <code>setTimeout</code> and <code>setInterval</code> methods
   allow authors to schedule timer-based events.</p>
 
@@ -43536,18 +43421,6 @@
   the <var title="">handler</var> as arguments to the
   <code>handleEvent()</code> function.</p>
 
-  <p>In the ECMAScript DOM binding, the ECMAScript native
-  <code>Function</code> type must implement the
-  <code>TimeoutHandler</code> interface such that invoking the
-  <code>handleEvent()</code> method of that interface on the object
-  from another language binding invokes the function itself, with the
-  arguments passed to <code>handleEvent()</code> as the arguments
-  passed to the function. In the ECMAScript DOM binding itself,
-  however, the <code>handleEvent()</code> method of the interface is
-  not directly accessible on <code>Function</code> objects. Such
-  functions must be called in the scope of the <span>browsing
-  context</span> in which they were created.</p>
-
   <p>Alternatively, <dfn title=""><code>setTimeout(<var
   title="">code</var>, <var title="">timeout</var>[, <var
   title="">language</var>])</code></dfn> may be used. This variant
@@ -43582,22 +43455,9 @@
   reentrant.)</p>
 
 
-  <h3>Events</h3>
 
-  <p id="js-function-listener">In the ECMAScript DOM binding, the
-  ECMAScript native <code>Function</code> type must implement the
-  <code>EventListener</code> interface such that invoking the
-  <code>handleEvent()</code> method of that interface on the object
-  from another language binding invokes the function itself, with the
-  <code>event</code> argument as its only argument. In the ECMAScript
-  binding itself, however, the <code>handleEvent()</code> method of
-  the interface is not directly accessible on <code>Function</code>
-  objects. Such functions, when invoked, must be called in the scope
-  of the <span>browsing context</span> that they were created in.</p>
 
 
-
-
   <h2 class="no-num" id="references">References</h2>
 
   <p class="big-issue">This section will be written in a future
@@ -44468,15 +44328,7 @@
 
 
 
-  <p>In the ECMAScript DOM binding, objects implementing this interface
-  can also be dereferenced using square bracket notation (e.g.
-  <code>foo[1]</code> or <code>foo["bar"]</code>). Dereferencing with
-  an integer index is equivalent to invoking the <code>item()</code>
-  method with that index, and dereferencing with a string index is
-  equivalent to invoking the <code>namedItem()</code> method with that
-  index.</p>
 
-
 "you have mail": bubble notification; flash taskbar button, 
 => how do you stop advertisers?
 




More information about the Commit-Watchers mailing list