You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The <code>getClientRect</code> operation must follow these steps, aborting on the first step that returns a value:</p><ol><li><p>If <ahref="#caret-range">caret range</a> is not null: <ol><li><p>Let <var>list</var> be the result of invoking the <codetitle="dom-Range-getClientRects">getClientRects()</code> method on the range.
455
-
<li><p>If <var>list</var> is empty, return null. <li><p>Return the <code>ClientRect</code> object in <var>list</var> at index 0. </ol><li><p>If <ahref="#caret-node">caret node</a> is a text entry widget that is a replaced element, and that is in the document, return a <code>ClientRect</code> object for the caret in the widget as represented by the <ahref="#caret-offset">caret offset</a> value. <li><p>Return null. </ol></dd>
454
+
<p>The <code>getClientRect</code> operation must follow these steps, aborting on the first step that returns a value:</p><ol><li><p>If <ahref="#caret-range">caret range</a> is not null: <ol><li><p>Let <var>list</var> be the result of invoking the <codetitle="dom-Range-getClientRects">getClientRects()</code> method on the range. <li><p>If <var>list</var> is empty, return null. <li><p>Return the <code>ClientRect</code> object in <var>list</var> at index 0. </ol><li><p>If <ahref="#caret-node">caret node</a> is a text entry widget that is a replaced element, and that is in the document, return a <code>ClientRect</code> object for the caret in the widget as represented by the <ahref="#caret-offset">caret offset</a> value. <li><p>Return null. </ol></dd>
<code>styleSheets</code> of type <spanclass="idlAttrType"><a>StyleSheetList</a></span>, readonly</dt>
1173
-
<dd>
1174
-
<p>The <code>styleSheets</code> attribute must return a <code>StyleSheetList</code> sequence representing the <ahref="#document-style-sheets">document style sheets</a>.</p><pclass="note">Because of historical IDL limitations the <code>styleSheets</code> attribute used to be on a separate interface, <code>DocumentStyle</code>.</dd>
<code>selectedStyleSheetSet</code> of type <spanclass="idlAttrType"><a>DOMString</a>?</span></dt>
1177
-
<dd>
1178
-
<p>The <code>selectedStyleSheetSet</code> attribute must, on getting, must run these steps:</p><ol><li><p>If there is a single <ahref="#enabled-style-sheet-set">enabled style sheet set</a> and no other <ahref="#document-style-sheets">document style sheets</a> with a non-empty <ahref="#style-sheet-title">style sheet title</a> have the <ahref="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return the <ahref="#style-sheet-set-name">style sheet set name</a> of the <ahref="#enabled-style-sheet-set">enabled style sheet set</a> and terminate these steps.</li><li><p>Otherwise, if <spantitle="style sheet">style sheets</span> from different <ahref="#style-sheet-set" title="style sheet set">style sheet sets</a> have their <ahref="#style-sheet-disabled-flag">style sheet disabled flag</a> unset, return <code>null</code> and terminate these steps.</li><li><p>Otherwise, return the empty string.</p><pclass="note">At this point either all <spantitle="style sheet">style sheets</span> with a non-empty <ahref="#style-sheet-title">style sheet title</a> have the <ahref="#style-sheet-disabled-flag">style sheet disabled flag</a> set, or there are no such <spantitle="style sheet">style sheets</span>.</p></li></ol><p>On setting the <codetitle="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code> attribute these steps must be run:</p><ol><li><p>If the value is <code>null</code> terminate this set of steps.</li><li><p>Otherwise, <ahref="#select-a-style-sheet-set">select a style sheet set</a> with as name the value passed.</li></ol><p>From the DOM's perspective, all views have the same <codetitle="dom-Document-selectedStyleSheetSet">selectedStyleSheetSet</code>. If a user agent supports multiple views with different selected alternative style sheets, then this attribute (and the <code>StyleSheet</code> interface's <codetitle="dom-StyleSheet-disabled">disabled</code> attribute) must return and set the value for the default view.</dd>
<code>lastStyleSheetSet</code> of type <spanclass="idlAttrType"><a>DOMString</a>?</span>, readonly</dt>
1181
-
<dd>
1182
-
<p>The <code>lastStyleSheetSet</code> attribute must return the <ahref="#last-style-sheet-set-name">last style sheet set name</a>.</p><pclass="note">This attribute is initially <code>null</code>.</dd>
<code>preferredStyleSheetSet</code> of type <spanclass="idlAttrType"><a>DOMString</a>?</span>, readonly</dt>
1185
-
<dd>
1186
-
<p>The <code>preferredStyleSheetSet</code> attribute must return the <ahref="#preferred-style-sheet-set-name">preferred style sheet set name</a>.</p><pclass="note">Unlike <codetitle="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code>, this attribute is initially the empty string.</dd>
<code>styleSheetSets</code> of type <spanclass="idlAttrType"><a>DOMString</a>[]</span>, readonly</dt>
1189
-
<dd>
1190
-
<p>The <code>styleSheetSets</code> attribute must return a list of the <ahref="#style-sheet-set-name" title="style sheet set name">style sheet set names</a> of the <ahref="#style-sheet-set" title="style sheet set">style sheet sets</a>, in order of the <ahref="#document-style-sheets">document style sheets</a>.</p><pclass="issue">The return value is intended to be 'DOMString[]', but the brackets are missing in the IDL due to a bug in the spec's build process.</dd>
<p>The <code>enableStyleSheetsForSet</code> operation must, when invoked, run these steps:</p><ol><li><p>If <var>name</var> is <code>null</code> terminate these steps.</li><li><p><ahref="#enable-a-style-sheet-set">Enable a style sheet set</a> with name <var>name</var>.</li></ol><pclass="note"><spantitle="Style sheet">Style sheets</span> with an empty <ahref="#style-sheet-title">style sheet title</a> are never affected by this method. This method does not change the values of the <codetitle="dom-Document-lastStyleSheetSet">lastStyleSheetSet</code> or <codetitle="dom-Document-preferredStyleSheetSet">preferredStyleSheetSet</code> attributes.</dd>
<p>The <code>getComputedStyle</code> operation must run these steps:</p><ol><li><p>Let <var>doc</var> be the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> associated with the <codeclass="external"><ahref="http://dev.w3.org/html5/spec/single-page.html#window">Window</a></code> object on which the method was invoked.</li><li><p>Let <var>obj</var> be <var>elt</var>.</li><li><p>If <var>pseudoElt</var> is as an <aclass="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:before</code>' or '<code>::before</code>' let <var>obj</var> be the '::before' pseudo-element of <var>elt</var>.</li><li><p>If <var>pseudoElt</var> is as an <aclass="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:after</code>' or '<code>::after</code>' let <var>obj</var> be the '::after' pseudo-element of <var>elt</var>.</li><li><p>Return a <ahref="#css-declaration-block">CSS declaration block</a> with the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> set and the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a> set to all properties the user agent supports with as value the <ahref="#resolved-value">resolved value</a> computed for <var>obj</var> using the style rules associated with <var>doc</var>.</p><pclass="note">This means that even if <var>obj</var> is in a different document (e.g. one fetched via <code>XMLHttpRequest</code>) it will still use the style rules associated with the document that is associated with the global object on which <codetitle="dom-Window-getComputedStyle">getComputedStyle()</code> was invoked to compute the <ahref="#css-declaration-block">CSS declaration block</a>.</p></li></ol><pclass="note">Because of historical IDL limitations the <code>getComputedStyle</code> operation used to be on a separate interface, <code>ViewCSS</code>.</dd>
<p>The <code>getDefaultComputedStyle</code> operation must run these steps:</p><ol><li><p>Let <var>doc</var> be the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> associated with the <codeclass="external"><ahref="http://dev.w3.org/html5/spec/single-page.html#window">Window</a></code> object on which the method was invoked.</li><li><p>Let <var>obj</var> be <var>elt</var>.</li><li><p>If <var>pseudoElt</var> is as an <aclass="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:before</code>' or '<code>::before</code>' let <var>obj</var> be the '::before' pseudo-element of <var>elt</var>.</li><li><p>If <var>pseudoElt</var> is as an <aclass="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:after</code>' or '<code>::after</code>' let <var>obj</var> be the '::after' pseudo-element of <var>elt</var>.</li><li><p>Return a <ahref="#css-declaration-block">CSS declaration block</a> with the <ahref="#css-declaration-block-readonly-flag">CSS declaration block readonly flag</a> set and the <ahref="#css-declaration-block-declarations">CSS declaration block declarations</a> set to all properties the user agent supports with as value the computed value for <var>obj</var> using the user agent-level style rules and user-level style rules associated with <var>doc</var>, ignoring transitions, animations, author-level style rules, author-level presentational hints and override-level style rules.</p></li></ol></dd>
0 commit comments