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>
456
+
</dl>
449
457
450
458
451
459
<h2id="extensions-to-the-element-interface"><spanclass="secno">6 </span>Extensions to the <codetitle="">Element</code> Interface</h2>
<code>scrollTop</code> of type <spanclass="idlAttrType"><a>long</a></span></dt>
470
478
<dd>
471
-
<p>The <code>scrollTop</code> attribute must return the result of running these steps:</p><ol><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a> or the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a> return zero and terminate these steps.</li><li><p>If the element is the root element return the value of <codetitle="dom-Window-scrollY">scrollY</code>.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any overflow, return the value of <codetitle="dom-Window-scrollY">scrollY</code>.</li><li><p>Return the y-coordinate of the <ahref="#content">content</a> at the alignment point with the top of the <ahref="#content-edge">content edge</a> of the element.</li></ol><p>When setting the <code>scrollTop</code> attribute these steps must be run:</p><ol><li><p>Let <vartitle="">y</var> be the given value.</li><li><p>If the element does not have any associated CSS layout box, the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, or the element has no overflow, terminate these steps.</li><li><p>If the element is the root element invoke <codetitle="dom-Window-scroll">scroll()</code> with zero as first argument and <vartitle="">y</var> as second.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any vertical overflow, invoke <codetitle="dom-Window-scroll">scroll()</code> with <codetitle="dom-Window-scrollX">scrollX</code> as first argument and <vartitle="">y</var> as second.</li><li><p><ahref="#scroll-an-element" title="scroll an element">Scroll the element</a> to <codetitle="dom-Element-scrollLeft">scrollLeft</code>,<vartitle="">y</var>. </ol></dd>
479
+
<p>The <code>scrollTop</code> attribute must return the result of running these steps:</p><ol><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a> or the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a> return zero and terminate these steps.</li><li><p>If the element is the root element return the value of <codetitle="dom-Window-scrollY">scrollY</code>.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any overflow, return the value of <codetitle="dom-Window-scrollY">scrollY</code>.</li><li><p>Return the y-coordinate of the <ahref="#content">content</a> at the alignment point with the top of the <ahref="#content-edge">content edge</a> of the element.</li></ol><p>When setting the <code>scrollTop</code> attribute these steps must be run:</p><ol><li><p>Let <vartitle="">y</var> be the given value.</li><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a>, the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, or the element has no overflow, terminate these steps.</li><li><p>If the element is the root element invoke <codetitle="dom-Window-scroll">scroll()</code> with zero as first argument and <vartitle="">y</var> as second.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any vertical overflow, invoke <codetitle="dom-Window-scroll">scroll()</code> with <codetitle="dom-Window-scrollX">scrollX</code> as first argument and <vartitle="">y</var> as second.</li><li><p><ahref="#scroll-an-element" title="scroll an element">Scroll the element</a> to <codetitle="dom-Element-scrollLeft">scrollLeft</code>,<vartitle="">y</var>. </ol></dd>
<code>scrollLeft</code> of type <spanclass="idlAttrType"><a>long</a></span></dt>
474
482
<dd>
475
-
<p>The <code>scrollLeft</code> attribute must return the result of running these steps:</p><ol><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a> or the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a> return zero and terminate these steps.</li><li><p>If the element is the root element return the value of <codetitle="dom-Window-scrollX">scrollX</code>.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any overflow, return the value of <codetitle="dom-Window-scrollX">scrollX</code>.</li><li><p>Return the x-coordinate of the <ahref="#content">content</a> at the alignment point with the left of the <ahref="#content-edge">content edge</a> of the element.</li></ol><p>When setting the <code>scrollLeft</code> attribute these steps must be run:</p><ol><li><p>Let <vartitle="">x</var> be the given value.</li><li><p>If the element does not have any associated CSS layout box, the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, or the element has no overflow, terminate these steps.</li><li><p>If the element is the root element invoke <codetitle="dom-Window-scroll">scroll()</code> with <vartitle="">x</var> as first argument and zero as second.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any vertical overflow, invoke <codetitle="dom-Window-scroll">scroll()</code> with <vartitle="">x</var> as first argument and <codetitle="dom-Window-scrollY">scrollY</code> as second.</li><li><p><ahref="#scroll-an-element" title="Scroll an element">Scroll the element</a> to <vartitle="">x</var>,<codetitle="dom-Element-scrollTop">scrollTop</code>. </ol></dd>
483
+
<p>The <code>scrollLeft</code> attribute must return the result of running these steps:</p><ol><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a> or the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a> return zero and terminate these steps.</li><li><p>If the element is the root element return the value of <codetitle="dom-Window-scrollX">scrollX</code>.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any overflow, return the value of <codetitle="dom-Window-scrollX">scrollX</code>.</li><li><p>Return the x-coordinate of the <ahref="#content">content</a> at the alignment point with the left of the <ahref="#content-edge">content edge</a> of the element.</li></ol><p>When setting the <code>scrollLeft</code> attribute these steps must be run:</p><ol><li><p>Let <vartitle="">x</var> be the given value.</li><li><p>If the element does not have any associated <ahref="#css-layout-box">CSS layout box</a>, the element is the root element and the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, or the element has no overflow, terminate these steps.</li><li><p>If the element is the root element invoke <codetitle="dom-Window-scroll">scroll()</code> with <vartitle="">x</var> as first argument and zero as second.</li><li><p>If the element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>, the <codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code> is in <aclass="external" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-quirks-mode">quirks mode</a>, and the element does not have any vertical overflow, invoke <codetitle="dom-Window-scroll">scroll()</code> with <vartitle="">x</var> as first argument and <codetitle="dom-Window-scrollY">scrollY</code> as second.</li><li><p><ahref="#scroll-an-element" title="Scroll an element">Scroll the element</a> to <vartitle="">x</var>,<codetitle="dom-Element-scrollTop">scrollTop</code>. </ol></dd>
<code>offsetParent</code> of type <spanclass="idlAttrType"><a>Element</a></span>, readonly</dt>
643
651
<dd>
644
-
<p>The <code>offsetParent</code> attribute must return the result of running these steps:</p><ol><li><p>If any of the following holds true return null and terminate this algorithm:</p><ul><li>The element does not have an associated CSS layout box.</li><li>The element is the root element.</li><li>The element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>.</li><li>The element's computed value of the '<code>position</code>' property is <code>fixed</code>.</li></ul></li><li><p>Return the nearest ancestor element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found:</p><ul><li>The computed value of the '<code>position</code>' property is not <code>static</code>.</li><li>It is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>.</li><li>The computed value of the '<code>position</code>' property of the element is <code>static</code> and the ancestor is one of the following <aclass="external" href="http://dev.w3.org/html5/spec/single-page.html#html-elements" title="HTML elements">HTML elements</a>: <code>td</code>, <code>th</code>, or <code>table</code>.</li></ul></li><li><p>Return null.</li></ol></dd>
652
+
<p>The <code>offsetParent</code> attribute must return the result of running these steps:</p><ol><li><p>If any of the following holds true return null and terminate this algorithm:</p><ul><li>The element does not have an associated <ahref="#css-layout-box">CSS layout box</a>.</li><li>The element is the root element.</li><li>The element is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>.</li><li>The element's computed value of the '<code>position</code>' property is <code>fixed</code>.</li></ul></li><li><p>Return the nearest ancestor element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found:</p><ul><li>The computed value of the '<code>position</code>' property is not <code>static</code>.</li><li>It is <ahref="#the-html-body-element">the HTML <code>body</code> element</a>.</li><li>The computed value of the '<code>position</code>' property of the element is <code>static</code> and the ancestor is one of the following <aclass="external" href="http://dev.w3.org/html5/spec/single-page.html#html-elements" title="HTML elements">HTML elements</a>: <code>td</code>, <code>th</code>, or <code>table</code>.</li></ul></li><li><p>Return null.</li></ol></dd>
0 commit comments