fix MutationObserver constructor
authorAnne van Kesteren <annevk@opera.com>
Thu, 16 Feb 2012 22:50:47 +0100
changeset 938a7a596e99a70
parent 937 f483bcdf3dba
child 939 169bb50139ba
fix MutationObserver constructor
Overview.html
Overview.src.html
dom-core.html
     1.1 --- a/Overview.html	Thu Feb 16 22:42:45 2012 +0100
     1.2 +++ b/Overview.html	Thu Feb 16 22:50:47 2012 +0100
     1.3 @@ -1746,13 +1746,13 @@
     1.4  
     1.5  <h4 id="mutation-observers"><span class="secno">5.1.4 </span>Mutation observers</h4>
     1.6  
     1.7 -<pre class="idl">[Constructor(<a href="#mutationcallback">MutationCallback</a> callback)]
     1.8 +<pre class="idl">[<a href="#dom-mutationobserver" title="dom-MutationObserver">Constructor</a>(<a href="#mutationcallback">MutationCallback</a> <var>callback</var>)]
     1.9  interface <dfn id="mutationobserver">MutationObserver</dfn> {
    1.10 -  void <a href="#dom-mutationobserver-observe" title="dom-MutationObserver-observe">observe</a>(<a href="#node">Node</a> target, <a href="#mutationobserverinit">MutationObserverInit</a> options);
    1.11 +  void <a href="#dom-mutationobserver-observe" title="dom-MutationObserver-observe">observe</a>(<a href="#node">Node</a> <var>target</var>, <a href="#mutationobserverinit">MutationObserverInit</a> <var>options</var>);
    1.12    void <a href="#dom-mutationobserver-disconnect" title="dom-MutationObserver-disconnect">disconnect</a>();
    1.13  };
    1.14  
    1.15 -callback <dfn id="mutationcallback">MutationCallback</dfn> = void (<a href="#mutationrecord">MutationRecord</a>[] mutations, <a href="#mutationobserver">MutationObserver</a> observer);
    1.16 +callback <dfn id="mutationcallback">MutationCallback</dfn> = void (<a href="#mutationrecord">MutationRecord</a>[] <var>mutations</var>, <a href="#mutationobserver">MutationObserver</a> <var>observer</var>);
    1.17  
    1.18  dictionary <dfn id="mutationobserverinit">MutationObserverInit</dfn> {
    1.19    boolean <span title="dom-MutationObserverInit-childlist">childList</span>;
    1.20 @@ -1776,15 +1776,13 @@
    1.21    readonly attribute DOMString? <a href="#dom-mutationrecord-oldvalue" title="dom-MutationRecord-oldValue">oldValue</a>;
    1.22  };</pre>
    1.23  
    1.24 -<p>When the constructor of the <code><a href="#mutationobserver">MutationObserver</a></code> interface is invoked
    1.25 -with callback <var title="">callback</var> and options <var title="">options</var>, run these steps:
    1.26 -
    1.27 -<ol>
    1.28 -  <li><p>If <var title="">callback</var> is null, <a href="#concept-throw" title="concept-throw">throw</a> a "<code><a href="#notfounderror">NotFoundError</a></code>" and terminate these steps.
    1.29 -  <li><p>Return a <code><a href="#mutationobserver">MutationObserver</a></code> <a href="#mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated</a> with the callback.
    1.30 -</ol>
    1.31 -
    1.32 -Besides the properties listed in the IDL for <code><a href="#mutationobserver">MutationObserver</a></code>, it has three internal properties:
    1.33 +<p>The
    1.34 +<dfn id="dom-mutationobserver" title="dom-MutationObserver"><code>MutationObserver(<var>callback</var>)</code></dfn>
    1.35 +constructor must return a new <code><a href="#mutationobserver">MutationObserver</a></code> object
    1.36 +<a href="#mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated</a> with
    1.37 +<var>callback</var>.
    1.38 +
    1.39 +<p>Besides the properties listed in the IDL for <code><a href="#mutationobserver">MutationObserver</a></code>, it has three internal properties:
    1.40  <ul>
    1.41    <li><p>An <dfn id="mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated callback</dfn>.
    1.42    <li><p>A list of <a href="#concept-node" title="concept-node">nodes</a> on which it is <a href="#registered-observer" title="registered-observer">registered</a>.
     2.1 --- a/Overview.src.html	Thu Feb 16 22:42:45 2012 +0100
     2.2 +++ b/Overview.src.html	Thu Feb 16 22:50:47 2012 +0100
     2.3 @@ -1741,13 +1741,13 @@
     2.4  
     2.5  <h4>Mutation observers</h4>
     2.6  
     2.7 -<pre class="idl">[Constructor(<span>MutationCallback</span> callback)]
     2.8 +<pre class="idl">[<span title=dom-MutationObserver>Constructor</span>(<span>MutationCallback</span> <var>callback</var>)]
     2.9  interface <dfn>MutationObserver</dfn> {
    2.10 -  void <span title=dom-MutationObserver-observe>observe</span>(<span>Node</span> target, <span>MutationObserverInit</span> options);
    2.11 +  void <span title=dom-MutationObserver-observe>observe</span>(<span>Node</span> <var>target</var>, <span>MutationObserverInit</span> <var>options</var>);
    2.12    void <span title=dom-MutationObserver-disconnect>disconnect</span>();
    2.13  };
    2.14  
    2.15 -callback <dfn>MutationCallback</dfn> = void (<span>MutationRecord</span>[] mutations, <span>MutationObserver</span> observer);
    2.16 +callback <dfn>MutationCallback</dfn> = void (<span>MutationRecord</span>[] <var>mutations</var>, <span>MutationObserver</span> <var>observer</var>);
    2.17  
    2.18  dictionary <dfn>MutationObserverInit</dfn> {
    2.19    boolean <span title=dom-MutationObserverInit-childlist>childList</span>;
    2.20 @@ -1771,15 +1771,13 @@
    2.21    readonly attribute DOMString? <span title=dom-MutationRecord-oldValue>oldValue</span>;
    2.22  };</pre>
    2.23  
    2.24 -<p>When the constructor of the <code>MutationObserver</code> interface is invoked
    2.25 -with callback <var title>callback</var> and options <var title>options</var>, run these steps:
    2.26 -
    2.27 -<ol>
    2.28 -  <li><p>If <var title>callback</var> is null, <span title=concept-throw>throw</span> a "<code>NotFoundError</code>" and terminate these steps.
    2.29 -  <li><p>Return a <code>MutationObserver</code> <span title=mutation-observer-associated-callback>associated</span> with the callback.
    2.30 -</ol>
    2.31 -
    2.32 -Besides the properties listed in the IDL for <code>MutationObserver</code>, it has three internal properties:
    2.33 +<p>The
    2.34 +<dfn title=dom-MutationObserver><code>MutationObserver(<var>callback</var>)</code></dfn>
    2.35 +constructor must return a new <code>MutationObserver</code> object
    2.36 +<span title=mutation-observer-associated-callback>associated</span> with
    2.37 +<var>callback</var>.
    2.38 +
    2.39 +<p>Besides the properties listed in the IDL for <code>MutationObserver</code>, it has three internal properties:
    2.40  <ul>
    2.41    <li><p>An <dfn title=mutation-observer-associated-callback>associated callback</dfn>.
    2.42    <li><p>A list of <span title=concept-node>nodes</span> on which it is <span title=registered-observer>registered</span>.
     3.1 --- a/dom-core.html	Thu Feb 16 22:42:45 2012 +0100
     3.2 +++ b/dom-core.html	Thu Feb 16 22:50:47 2012 +0100
     3.3 @@ -1701,13 +1701,13 @@
     3.4  
     3.5  <h4 id="mutation-observers"><span class="secno">5.1.4 </span>Mutation observers</h4>
     3.6  
     3.7 -<pre class="idl">[Constructor(<a href="#mutationcallback">MutationCallback</a> callback)]
     3.8 +<pre class="idl">[<a href="#dom-mutationobserver" title="dom-MutationObserver">Constructor</a>(<a href="#mutationcallback">MutationCallback</a> <var>callback</var>)]
     3.9  interface <dfn id="mutationobserver">MutationObserver</dfn> {
    3.10 -  void <a href="#dom-mutationobserver-observe" title="dom-MutationObserver-observe">observe</a>(<a href="#node">Node</a> target, <a href="#mutationobserverinit">MutationObserverInit</a> options);
    3.11 +  void <a href="#dom-mutationobserver-observe" title="dom-MutationObserver-observe">observe</a>(<a href="#node">Node</a> <var>target</var>, <a href="#mutationobserverinit">MutationObserverInit</a> <var>options</var>);
    3.12    void <a href="#dom-mutationobserver-disconnect" title="dom-MutationObserver-disconnect">disconnect</a>();
    3.13  };
    3.14  
    3.15 -callback <dfn id="mutationcallback">MutationCallback</dfn> = void (<a href="#mutationrecord">MutationRecord</a>[] mutations, <a href="#mutationobserver">MutationObserver</a> observer);
    3.16 +callback <dfn id="mutationcallback">MutationCallback</dfn> = void (<a href="#mutationrecord">MutationRecord</a>[] <var>mutations</var>, <a href="#mutationobserver">MutationObserver</a> <var>observer</var>);
    3.17  
    3.18  dictionary <dfn id="mutationobserverinit">MutationObserverInit</dfn> {
    3.19    boolean <span title="dom-MutationObserverInit-childlist">childList</span>;
    3.20 @@ -1731,15 +1731,13 @@
    3.21    readonly attribute DOMString? <a href="#dom-mutationrecord-oldvalue" title="dom-MutationRecord-oldValue">oldValue</a>;
    3.22  };</pre>
    3.23  
    3.24 -<p>When the constructor of the <code><a href="#mutationobserver">MutationObserver</a></code> interface is invoked
    3.25 -with callback <var title="">callback</var> and options <var title="">options</var>, run these steps:
    3.26 -
    3.27 -<ol>
    3.28 -  <li><p>If <var title="">callback</var> is null, <a href="#concept-throw" title="concept-throw">throw</a> a "<code><a href="#notfounderror">NotFoundError</a></code>" and terminate these steps.
    3.29 -  <li><p>Return a <code><a href="#mutationobserver">MutationObserver</a></code> <a href="#mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated</a> with the callback.
    3.30 -</ol>
    3.31 -
    3.32 -Besides the properties listed in the IDL for <code><a href="#mutationobserver">MutationObserver</a></code>, it has three internal properties:
    3.33 +<p>The
    3.34 +<dfn id="dom-mutationobserver" title="dom-MutationObserver"><code>MutationObserver(<var>callback</var>)</code></dfn>
    3.35 +constructor must return a new <code><a href="#mutationobserver">MutationObserver</a></code> object
    3.36 +<a href="#mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated</a> with
    3.37 +<var>callback</var>.
    3.38 +
    3.39 +<p>Besides the properties listed in the IDL for <code><a href="#mutationobserver">MutationObserver</a></code>, it has three internal properties:
    3.40  <ul>
    3.41    <li><p>An <dfn id="mutation-observer-associated-callback" title="mutation-observer-associated-callback">associated callback</dfn>.
    3.42    <li><p>A list of <a href="#concept-node" title="concept-node">nodes</a> on which it is <a href="#registered-observer" title="registered-observer">registered</a>.