Skip to content

Commit

Permalink
Introducing node.isConnected
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Mar 31, 2016
1 parent 6b06d0b commit b9b9fe1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3121,6 +3121,7 @@ interface Node : EventTarget {

readonly attribute DOMString baseURI;

readonly attribute boolean isConnected;
readonly attribute Document? ownerDocument;
readonly attribute Node rootNode;
readonly attribute Node? parentNode;
Expand Down Expand Up @@ -3350,6 +3351,10 @@ The <dfn attribute for=Node><code>baseURI</code></dfn> attribute's getter must r
<hr>

<dl class=domintro>
<dt><code><var>node</var> . {{Node/isConnected}}</code>
<dd><p>Returns true if <var>node</var> is <a>in a shadow-including document</a> and false
otherwise.

<dt><code><var>node</var> . {{Node/ownerDocument}}</code>
<dd>
Returns the <a>node document</a>.
Expand Down Expand Up @@ -3386,6 +3391,9 @@ The <dfn attribute for=Node><code>baseURI</code></dfn> attribute's getter must r
<a>next sibling</a>.
</dl>

<p>The <dfn attribute for=Node><code>isConnected</code></dfn> attribute's getter must return true,
if <a>context object</a> is <a>in a shadow-including document</a>, and false otherwise.</p>

<p>The <dfn attribute for=Node><code>ownerDocument</code></dfn> attribute's getter must return null,
if the <a>context object</a> is a <a>document</a>, and the <a>context object</a>'s
<a>node document</a> otherwise.
Expand Down
11 changes: 10 additions & 1 deletion dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-03-30">30 March 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-03-31">31 March 2016</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>Participate:
Expand Down Expand Up @@ -1842,6 +1842,7 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se

readonly attribute DOMString <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="DOMString " href="#dom-node-baseuri">baseURI</a>;

readonly attribute boolean <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="boolean " href="#dom-node-isconnected">isConnected</a>;
readonly attribute <a data-link-type="idl-name" href="#document">Document</a>? <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Document? " href="#dom-node-ownerdocument">ownerDocument</a>;
readonly attribute <a data-link-type="idl-name" href="#node">Node</a> <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Node " href="#dom-node-rootnode">rootNode</a>;
readonly attribute <a data-link-type="idl-name" href="#node">Node</a>? <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Node? " href="#dom-node-parentnode">parentNode</a>;
Expand Down Expand Up @@ -1975,6 +1976,10 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-baseuri"><code>baseURI</code><a class="self-link" href="#dom-node-baseuri"></a></dfn> attribute’s getter must return <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="#concept-document-base-url">base URL</a>, <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a>.</p>
<hr>
<dl class="domintro">
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-isconnected">isConnected</a></code></code>
<dd>
<p>Returns true if <var>node</var> is <a data-link-type="dfn" href="#in-a-shadow-including-document">in a shadow-including document</a> and false
otherwise. </p>
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-ownerdocument">ownerDocument</a></code></code>
<dd> Returns the <a data-link-type="dfn" href="#concept-node-document">node document</a>.
Returns null for <a data-link-type="dfn" href="#concept-document">documents</a>.
Expand All @@ -1997,6 +2002,8 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-nextsibling">nextSibling</a></code></code>
<dd>Returns the <a data-link-type="dfn" href="#concept-tree-next-sibling">next sibling</a>.
</dl>
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-isconnected"><code>isConnected</code><a class="self-link" href="#dom-node-isconnected"></a></dfn> attribute’s getter must return true,
if <a data-link-type="dfn" href="#context-object">context object</a> is <a data-link-type="dfn" href="#in-a-shadow-including-document">in a shadow-including document</a>, and false otherwise.</p>
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-ownerdocument"><code>ownerDocument</code><a class="self-link" href="#dom-node-ownerdocument"></a></dfn> attribute’s getter must return null,
if the <a data-link-type="dfn" href="#context-object">context object</a> is a <a data-link-type="dfn" href="#concept-document">document</a>, and the <a data-link-type="dfn" href="#context-object">context object</a>’s <a data-link-type="dfn" href="#concept-node-document">node document</a> otherwise. </p>
<p class="note" role="note">The <a data-link-type="dfn" href="#concept-node-document">node document</a> of a <a data-link-type="dfn" href="#concept-document">document</a> is that <a data-link-type="dfn" href="#concept-document">document</a> itself. All <a data-link-type="dfn" href="#concept-node">nodes</a> have a <a data-link-type="dfn" href="#concept-node-document">node document</a> at all times. </p>
Expand Down Expand Up @@ -5230,6 +5237,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<li><a href="#dom-documenttype-internalsubset">internalSubset</a><span>, in §8.2</span>
<li><a href="#dom-range-intersectsnode">intersectsNode(node)</a><span>, in §5.2</span>
<li><a href="#concept-event-listener-invoke">invoke</a><span>, in §3.8</span>
<li><a href="#dom-node-isconnected">isConnected</a><span>, in §4.4</span>
<li><a href="#dom-node-isdefaultnamespace">isDefaultNamespace(namespace)</a><span>, in §4.4</span>
<li><a href="#dom-text-iselementcontentwhitespace">isElementContentWhitespace</a><span>, in §8.2</span>
<li><a href="#dom-node-isequalnode">isEqualNode(otherNode)</a><span>, in §4.4</span>
Expand Down Expand Up @@ -5945,6 +5953,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I

readonly attribute DOMString <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="DOMString " href="#dom-node-baseuri">baseURI</a>;

readonly attribute boolean <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="boolean " href="#dom-node-isconnected">isConnected</a>;
readonly attribute <a data-link-type="idl-name" href="#document">Document</a>? <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Document? " href="#dom-node-ownerdocument">ownerDocument</a>;
readonly attribute <a data-link-type="idl-name" href="#node">Node</a> <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Node " href="#dom-node-rootnode">rootNode</a>;
readonly attribute <a data-link-type="idl-name" href="#node">Node</a>? <a class="idl-code" data-link-type="attribute" data-readonly="" data-type="Node? " href="#dom-node-parentnode">parentNode</a>;
Expand Down

0 comments on commit b9b9fe1

Please sign in to comment.