Skip to content

Commit

Permalink
Move structured cloning out from under Common DOM Interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Feb 29, 2016
1 parent 457d277 commit e09b782
Showing 1 changed file with 54 additions and 59 deletions.
113 changes: 54 additions & 59 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7492,6 +7492,60 @@ interface <dfn>DOMStringMap</dfn> {
</div>


<div w-nodev>

<h4>Garbage collection</h4>

<p>There is an <dfn>implied strong reference</dfn> from any IDL attribute that returns a
pre-existing object to that object.</p>

<div class="example">

<p>For example, the <code data-x="dom-document">window.document</code> attribute means that there
is a strong reference from a <code>Window</code> object to its <code>Document</code> object.
Similarly, there is always a strong reference from a <code>Document</code> to any
descendant nodes, and from any node to its <span>node document</span>.</p>

</div>

</div>


<!--TOPIC:HTML Syntax and Parsing-->
<h3>Namespaces</h3>

<p>The <dfn>HTML namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xhtml</code></p>

<p>The <dfn>MathML namespace</dfn> is: <code data-x="">http://www.w3.org/1998/Math/MathML</code></p>

<p>The <dfn>SVG namespace</dfn> is: <code data-x="">http://www.w3.org/2000/svg</code></p>

<p>The <dfn>XLink namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xlink</code></p>

<p>The <dfn>XML namespace</dfn> is: <code data-x="">http://www.w3.org/XML/1998/namespace</code></p>

<p>The <dfn>XMLNS namespace</dfn> is: <code data-x="">http://www.w3.org/2000/xmlns/</code></p>

<hr>

<p>Data mining tools and other user agents that perform operations
on content without running scripts, evaluating CSS or XPath
expressions, or otherwise exposing the resulting DOM to arbitrary
content, may "support namespaces" by just asserting that their DOM
node analogues are in certain namespaces, without actually exposing
the above strings.</p>

<hr>

<p class="note">In <span>the HTML syntax</span>, namespace prefixes
and namespace declarations do not have the same effect as in XML.
For instance, the colon has no special meaning in HTML element
names.</p>


<div w-nodev>

<h3>Safe passing of structured data</h3>

<h4>Transferable objects</h4>

Expand All @@ -7509,8 +7563,6 @@ interface <dfn>DOMStringMap</dfn> {
<li><code>ImageBitmap</code> (defined in this specification)
</ul>

<div w-nodev>

<p>The following IDL block formalizes this:</p>

<pre class="idl">typedef (<span>ArrayBuffer</span>
Expand All @@ -7537,12 +7589,6 @@ interface <dfn>DOMStringMap</dfn> {
<code>CanvasProxy</code> object</a> and how to <a href="#transferMessagePort">transfer a
<code>MessagePort</code> object</a> are given in the relevant sections of this specification.</p>

</div>

<div w-nodev>

<h4>Safe passing of structured data</h4>

<p>When a user agent is required to obtain a <dfn>structured clone</dfn> of a value, optionally
with a <i>transfer map</i>, it must run the following algorithm, which either returns a separate
value, or throws an exception. If a <i>transfer map</i> is provided, it consists of an association
Expand Down Expand Up @@ -7888,57 +7934,6 @@ interface <dfn>DOMStringMap</dfn> {
</div>


<div w-nodev>

<h4>Garbage collection</h4>

<p>There is an <dfn>implied strong reference</dfn> from any IDL attribute that returns a
pre-existing object to that object.</p>

<div class="example">

<p>For example, the <code data-x="dom-document">window.document</code> attribute means that there
is a strong reference from a <code>Window</code> object to its <code>Document</code> object.
Similarly, there is always a strong reference from a <code>Document</code> to any
descendant nodes, and from any node to its <span>node document</span>.</p>

</div>

</div>


<!--TOPIC:HTML Syntax and Parsing-->
<h3>Namespaces</h3>

<p>The <dfn>HTML namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xhtml</code></p>

<p>The <dfn>MathML namespace</dfn> is: <code data-x="">http://www.w3.org/1998/Math/MathML</code></p>

<p>The <dfn>SVG namespace</dfn> is: <code data-x="">http://www.w3.org/2000/svg</code></p>

<p>The <dfn>XLink namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xlink</code></p>

<p>The <dfn>XML namespace</dfn> is: <code data-x="">http://www.w3.org/XML/1998/namespace</code></p>

<p>The <dfn>XMLNS namespace</dfn> is: <code data-x="">http://www.w3.org/2000/xmlns/</code></p>

<hr>

<p>Data mining tools and other user agents that perform operations
on content without running scripts, evaluating CSS or XPath
expressions, or otherwise exposing the resulting DOM to arbitrary
content, may "support namespaces" by just asserting that their DOM
node analogues are in certain namespaces, without actually exposing
the above strings.</p>

<hr>

<p class="note">In <span>the HTML syntax</span>, namespace prefixes
and namespace declarations do not have the same effect as in XML.
For instance, the colon has no special meaning in HTML element
names.</p>


<!--TOPIC:DOM APIs-->
<h2 split-filename="dom" id="dom">Semantics, structure, and APIs of HTML documents</h2>

Expand Down

0 comments on commit e09b782

Please sign in to comment.