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>When a user agent is to <dfnid="perform-a-scroll">perform a scroll</dfn> of a scrolling box <vartitle="">box</var>, to a given position <vartitle="">position</var>, with a set of
416
-
steps <vartitle="">task</var>, an associated element <vartitle="">element</var> and a scroll behavior <vartitle="">behavior</var>, the following steps must be run:
416
+
steps <vartitle="">task</var>, an associated element <vartitle="">element</var> and optionally a scroll behavior <vartitle="">behavior</var> (which is
417
+
<codetitle="">auto</code> if omitted), the following steps must be run:
417
418
418
419
<ol>
419
420
<li><p><ahref="#concept-smooth-scroll-aborted" title="concept-smooth-scroll-aborted">Abort</a> any ongoing <ahref="#concept-smooth-scroll" title="concept-smooth-scroll">smooth scroll</a> for <vartitle="">box</var>.
420
421
<li><p>If the user agent honors the '<code><ahref="#scroll-behavior">scroll-behavior</a></code>' property and one of the following are true:
421
422
<ul>
422
-
<li><p><vartitle="">behavior</var> is <codetitle="">auto</code> and <vartitle="">element</var> is not null and its computed value of the '<code><ahref="#scroll-behavior">scroll-behavior</a></code>'
423
-
property is '<codetitle="scroll-behavior-smooth"><ahref="#scroll-behavior-smooth">smooth</a></code>'
423
+
<li><p><vartitle="">behavior</var> is <codetitle="">auto</code> and <vartitle="">element</var> is not null and its computed value of the
424
+
'<code><ahref="#scroll-behavior">scroll-behavior</a></code>' property is '<codetitle="scroll-behavior-smooth"><ahref="#scroll-behavior-smooth">smooth</a></code>'
424
425
<li><p><vartitle="">behavior</var> is <codetitle="">smooth</code>
<p>The <dfnid="dom-window-pageyoffset" title="dom-Window-pageYOffset"><code>pageYOffset</code></dfn> attribute must return the value returned by the <code>scrollY</code> attribute.</p>
546
547
547
-
<p>When the <dfnid="dom-window-scroll" title="dom-Window-scroll"><code>scroll(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked these steps must be run:</p>
548
+
<p>When the <dfnid="dom-window-scroll" title="dom-Window-scroll"><code>scroll(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked these
549
+
steps must be run:</p>
548
550
<ol>
549
551
<li><p>If there is no <ahref="#viewport">viewport</a>, abort these steps.
<li><p><ahref="#perform-a-scroll">Perform a scroll</a> of the <ahref="#viewport">viewport</a> to <vartitle="">position</var>, with the set of steps <vartitle="">task</var>, and the
576
-
<codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code>'s root element as the associated element, if there is one, or null otherwise, and the scroll behavior being the value of the <codetitle="">behavior</code> dictionary member of <vartitle="">options</var>.
578
+
<codeclass="external"><ahref="http://dom.spec.whatwg.org/#document">Document</a></code>'s root element as the associated element, if there is one, or null otherwise, and the scroll behavior being the
579
+
value of the <codetitle="">behavior</code> dictionary member of <vartitle="">options</var>.
577
580
</ol>
578
581
579
-
<p>When the <dfnid="dom-window-scrollto" title="dom-Window-scrollTo"><code>scrollTo(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked, the user agent must act as if
580
-
the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with the same arguments.</p>
582
+
<p>When the <dfnid="dom-window-scrollto" title="dom-Window-scrollTo"><code>scrollTo(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked, the
583
+
user agent must act as if the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with the same arguments.</p>
581
584
582
-
<p>When the <dfnid="dom-window-scrollby" title="dom-Window-scrollBy"><code>scrollBy(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked, the user agent must act as if
583
-
the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with
585
+
<p>When the <dfnid="dom-window-scrollby" title="dom-Window-scrollBy"><code>scrollBy(<vartitle="">x</var>, <vartitle="">y</var>, <vartitle="">options</var>)</code></dfn> method is invoked, the
586
+
user agent must act as if the <codetitle="dom-Window-scroll"><ahref="#dom-window-scroll">scroll()</a></code> method was invoked with
584
587
<vartitle="">x</var> plus <codetitle="dom-Window-scrollX"><ahref="#dom-window-scrollx">scrollX</a></code>
585
588
as first argument and <vartitle="">y</var> plus
586
589
<codetitle="dom-Window-scrollY"><ahref="#dom-window-scrolly">scrollY</a></code> as second argument.</p>
<p>When a user agent is to <dfn>perform a scroll</dfn> of a scrolling box <vartitle>box</var>, to a given position <vartitle>position</var>, with a set of
384
-
steps <vartitle>task</var>, an associated element <vartitle>element</var> and a scroll behavior <vartitle>behavior</var>, the following steps must be run:
384
+
steps <vartitle>task</var>, an associated element <vartitle>element</var> and optionally a scroll behavior <vartitle>behavior</var> (which is
385
+
<codetitle>auto</code> if omitted), the following steps must be run:
385
386
386
387
<ol>
387
388
<li><p><spantitle=concept-smooth-scroll-aborted>Abort</span> any ongoing <spantitle=concept-smooth-scroll>smooth scroll</span> for <vartitle>box</var>.
388
389
<li><p>If the user agent honors the '<code>scroll-behavior</code>' property and one of the following are true:
389
390
<ul>
390
-
<li><p><vartitle>behavior</var> is <codetitle>auto</code> and <vartitle>element</var> is not null and its computed value of the '<code>scroll-behavior</code>'
391
-
property is '<codetitle=scroll-behavior-smooth>smooth</code>'
391
+
<li><p><vartitle>behavior</var> is <codetitle>auto</code> and <vartitle>element</var> is not null and its computed value of the
392
+
'<code>scroll-behavior</code>' property is '<codetitle=scroll-behavior-smooth>smooth</code>'
392
393
<li><p><vartitle>behavior</var> is <codetitle>smooth</code>
393
394
</ul>
394
395
<p>...then follow these substeps:
@@ -512,7 +513,8 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
512
513
513
514
<p>The <dfntitle=dom-Window-pageYOffset><code>pageYOffset</code></dfn> attribute must return the value returned by the <code>scrollY</code> attribute.</p>
514
515
515
-
<p>When the <dfntitle=dom-Window-scroll><code>scroll(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked these steps must be run:</p>
516
+
<p>When the <dfntitle=dom-Window-scroll><code>scroll(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked these
517
+
steps must be run:</p>
516
518
<ol>
517
519
<li><p>If there is no <span>viewport</span>, abort these steps.
518
520
<dlclass=switch>
@@ -541,14 +543,15 @@ <h2>Extensions to the <code title>Window</code> Interface</h2>
541
543
<codedata-anolis-spec=dom>Document</code> object.
542
544
</ol>
543
545
<li><p><span>Perform a scroll</span> of the <span>viewport</span> to <vartitle>position</var>, with the set of steps <vartitle>task</var>, and the
544
-
<codedata-anolis-spec=dom>Document</code>'s root element as the associated element, if there is one, or null otherwise, and the scroll behavior being the value of the <codetitle>behavior</code> dictionary member of <vartitle>options</var>.
546
+
<codedata-anolis-spec=dom>Document</code>'s root element as the associated element, if there is one, or null otherwise, and the scroll behavior being the
547
+
value of the <codetitle>behavior</code> dictionary member of <vartitle>options</var>.
545
548
</ol>
546
549
547
-
<p>When the <dfntitle=dom-Window-scrollTo><code>scrollTo(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked, the user agent must act as if
548
-
the <codetitle=dom-Window-scroll>scroll()</code> method was invoked with the same arguments.</p>
550
+
<p>When the <dfntitle=dom-Window-scrollTo><code>scrollTo(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked, the
551
+
user agent must act as if the <codetitle=dom-Window-scroll>scroll()</code> method was invoked with the same arguments.</p>
549
552
550
-
<p>When the <dfntitle=dom-Window-scrollBy><code>scrollBy(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked, the user agent must act as if
551
-
the <codetitle=dom-Window-scroll>scroll()</code> method was invoked with
553
+
<p>When the <dfntitle=dom-Window-scrollBy><code>scrollBy(<vartitle>x</var>, <vartitle>y</var>, <vartitle>options</var>)</code></dfn> method is invoked, the
554
+
user agent must act as if the <codetitle=dom-Window-scroll>scroll()</code> method was invoked with
552
555
<vartitle>x</var> plus <codetitle='dom-Window-scrollX'>scrollX</code>
553
556
as first argument and <vartitle>y</var> plus
554
557
<codetitle='dom-Window-scrollY'>scrollY</code> as second argument.</p>
0 commit comments