Skip to content

Commit

Permalink
[Bug 23789]: [Shadow] Migrate the Extentions to Element WebIDL defini…
Browse files Browse the repository at this point in the history
…tion to the format supported by ReSpec.
  • Loading branch information
hayatoito committed Nov 11, 2013
1 parent 92831b6 commit 420ac3e
Showing 1 changed file with 34 additions and 47 deletions.
81 changes: 34 additions & 47 deletions spec/shadow/index.html
Expand Up @@ -1169,57 +1169,44 @@ <h3><code>ShadowRoot</code> Object</h3>

</section>

<section id="extensions-to-element">
<h3>Extensions to <code>Element</code> Interface</h3>
<section id="extensions-to-element">
<h3>Extensions to <code>Element</code> Interface</h3>

<pre class="myidl">
partial interface <a href="http://dom.spec.whatwg.org/#element">Element</a> {
<a href="#api-shadow-root">ShadowRoot</a> <a href="#api-partial-element-create-shadow-root">createShadowRoot</a>();
NodeList <a href="#api-partial-element-get-destination-insertion-points">getDestinationInsertionPoints</a>();
readonly attribute <a href="#api-shadow-root">ShadowRoot</a>? <a href="#api-partial-element-shadow-root">shadowRoot</a>;
attribute DOMString <a href="#api-partial-element-pseudo">pseudo</a>;
}
</pre>

<section id="partial-element-attributes">
<h4>Attributes</h4>

<dl>
<dt><dfn id="api-partial-element-part">part</dfn> of type <code>DOMString</code></dt>
<dd>Represents the <a href="#dfn-part-pseudo-element-value">part pseudo-element value</a>, associated with the <a href="http://www.w3.org/TR/domcore/#concept-element">element</a>.</dd>
<dd>On getting, the attribute <strong>must</strong> return the current <a href="#dfn-part-pseudo-element-value">part pseudo-element value</a> or <strong>empty string</strong> if there is no <a href="#dfn-part-pseudo-element">part pseudo-element</a> associated with this <a href="http://www.w3.org/TR/domcore/#concept-element">element</a>.</dd>
<dd>On setting, these steps <strong>must</strong> be run:
<ol>
<li>If the <a href="#dfn-part-pseudo-element">part pseudo-element</a>, associated with this <a href="http://www.w3.org/TR/domcore/#concept-element">element</a> already exists, discard it</li>
<li>If the new value is not <strong>null</strong>, create a new <a href="#dfn-part-pseudo-element">part pseudo-element</a> with <a href="http://www.w3.org/TR/domcore/#concept-element">element</a> and the new value as its <a href="#dfn-part-pseudo-element-value">value</a>.</li>
</ol></dd>
<dt><dfn id="api-partial-element-shadow-root">shadowRoot</dfn> of type <a href="#api-shadow-root"><code>ShadowRoot</code></a></dt>
<dd>Represents the <a href="#dfn-youngest-shadow-root">youngest shadow root</a> that <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> <a href="#dfn-verb-host">hosts</a>.</dd>
<dd>On getting, the attribute <strong>must</strong> return the <a href="#dfn-youngest-shadow-root">youngest shadow root</a> that <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> <a href="#dfn-verb-host">hosts</a>, or <strong>null</strong> if no such <a href="#dfn-shadow-root">shadow root</a> is accessible.</dd>
<dd>For <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#semantics">HTML elements</a>, the <a href="#html-elements-and-their-shadow-trees">UA-provided</a> <a href="#dfn-shadow-tree">shadow trees</a> <strong>must not</strong> be accessible.</dd>
</dl>
</section>

<section id="partial-element-methods">
<h4>Methods</h4>
<dl class="idl" title="partial interface Element">
<dt>ShadowRoot createShadowRoot()</dt>
<dd>
When invoked, these steps <strong>must</strong> be run:
<ol>
<li>Create a new instance of the <a href="#api-shadow-root"><code>ShadowRoot</code></a> object</li>
<li>Add the <a href="#api-shadow-root"><code>ShadowRoot</code></a> object to the <a href="#dfn-shadow-roots-list">ordered list of shadow roots</a> associated with the <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> as the <a href="#dfn-youngest-shadow-root">youngest shadow root</a></li>
<li>Return <a href="#api-shadow-root"><code>ShadowRoot</code></a> object.</li>
</ol>
</dd>

<dl>
<dt><dfn id="api-partial-element-create-shadow-root"><code>createShadowRoot</code></dfn></dt>
<dd>When invoked, these steps <strong>must</strong> be run:
<ol>
<li>Create a new instance of the <a href="#api-shadow-root"><code>ShadowRoot</code></a> object</li>
<li>Add the <a href="#api-shadow-root"><code>ShadowRoot</code></a> object to the <a href="#dfn-shadow-roots-list">ordered list of shadow roots</a> associated with the <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> as the <a href="#dfn-youngest-shadow-root">youngest shadow root</a></li>
<li>Return <a href="#api-shadow-root"><code>ShadowRoot</code></a> object.</li>
</ol></dd>
</dl>
<dt>NodeList getDestinationInsertionPoints()</dt>
<dd>When invoked, the method <strong>must</strong> return a <a href="http://www.w3.org/TR/domcore/#concept-collection-static">static</a> <a href="http://www.w3.org/TR/domcore/#nodelist"><code>NodeList</code></a> consisting of <a href="#dfn-insertion-point">insertion points</a> in the <a href="#dfn-destination-insertion-points">destination insertion points</a> of the <a href="http://www.w3.org/TR/domcore/#context-object">context object</a>.</dd>

<dl>
<dt><dfn id="api-partial-element-get-destination-insertion-points"><code>getDestinationInsertionPoints</code></dfn></dt>
<dd>When invoked, the method <strong>must</strong> return a <a href="http://www.w3.org/TR/domcore/#concept-collection-static">static</a> <a href="http://www.w3.org/TR/domcore/#nodelist"><code>NodeList</code></a> consisting of <a href="#dfn-insertion-point">insertion points</a> in the <a href="#dfn-destination-insertion-points">destination insertion points</a> of the <a href="http://www.w3.org/TR/domcore/#context-object">context object</a>.</dd>
</dl>
</section>
<dt>readonly attribute ShadowRoot? shadowRoot</dt>
<dd>
<p>Represents the <a href="#dfn-youngest-shadow-root">youngest shadow root</a> that <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> <a href="#dfn-verb-host">hosts</a>.</p>
<p>On getting, the attribute <strong>must</strong> return the <a href="#dfn-youngest-shadow-root">youngest shadow root</a> that <a href="http://www.w3.org/TR/domcore/#context-object">context object</a> <a href="#dfn-verb-host">hosts</a>, or <strong>null</strong> if no such <a href="#dfn-shadow-root">shadow root</a> is accessible.</p>
<p>For <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#semantics">HTML elements</a>, the <a href="#html-elements-and-their-shadow-trees">UA-provided</a> <a href="#dfn-shadow-tree">shadow trees</a> <strong>must not</strong> be accessible.</p>
</dd>

</section>
<dt>attribute DOMString part</dt>
<dd>
<p>Represents the <a href="#dfn-part-pseudo-element-value">part pseudo-element value</a>, associated with the <a href="http://www.w3.org/TR/domcore/#concept-element">element</a>.</p>
<p>On getting, the attribute <strong>must</strong> return the current <a href="#dfn-part-pseudo-element-value">part pseudo-element value</a> or <strong>empty string</strong> if there is no <a href="#dfn-part-pseudo-element">part pseudo-element</a> associated with this <a href="http://www.w3.org/TR/domcore/#concept-element">element</a>.</p>
<p>
On setting, these steps <strong>must</strong> be run:
<ol>
<li>If the <a href="#dfn-part-pseudo-element">part pseudo-element</a>, associated with this <a href="http://www.w3.org/TR/domcore/#concept-element">element</a> already exists, discard it</li>
<li>If the new value is not <strong>null</strong>, create a new <a href="#dfn-part-pseudo-element">part pseudo-element</a> with <a href="http://www.w3.org/TR/domcore/#concept-element">element</a> and the new value as its <a href="#dfn-part-pseudo-element-value">value</a>.</li>
</ol>
</p>
</dd>
</dl>
</section>

<section id="css-host-rule-interface">
<h3><code>CSSHostRule</code> Interface</h3>
Expand Down

0 comments on commit 420ac3e

Please sign in to comment.