Skip to content

Commit 9550767

Browse files
committed
[cssom-view] Rename viewportElement to scrollingElement
1 parent 8398f6f commit 9550767

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cssom-view/Overview.bs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ partial interface Document {
839839
Element? elementFromPoint(double x, double y);
840840
sequence<Element> elementsFromPoint(double x, double y);
841841
CaretPosition? caretPositionFromPoint(double x, double y);
842-
readonly attribute Element? viewportElement;
842+
readonly attribute Element? scrollingElement;
843843
};
844844
</pre>
845845

@@ -919,22 +919,22 @@ specification and therefore the exact details of
919919
are therefore too. Hit testing will hopefully be defined in a future
920920
revision of CSS or HTML.
921921

922-
<p class=atrisk>The <dfn attribute for=Document>viewportElement</dfn> attribute, on getting, must run these steps:
922+
<p class=atrisk>The <dfn attribute for=Document>scrollingElement</dfn> attribute, on getting, must run these steps:
923923

924924
1. If the {{Document}} is in <a>quirks mode</a>, follow these substeps:
925-
1. If <a>the HTML body element</a> exists, return <a>the HTML body element</a> and abort these steps.
925+
1. If <a>the HTML <code>body</code> element</a> exists, return <a>the HTML <code>body</code> element</a> and abort these steps.
926926
1. Return null and abort these steps.
927927
1. If there is a root element, return the root element and abort these steps.
928928
1. Return null.
929929

930930
Note: For non-conforming user agents that always use the <a>quirks mode</a> behavior for {{Element/scrollTop}}
931-
and {{Element/scrollLeft}}, the {{Document/viewportElement}} attribute is expected to also always return
932-
<a>the HTML body element</a> (or null if it does not exist).
931+
and {{Element/scrollLeft}}, the {{Document/scrollingElement}} attribute is expected to also always return
932+
<a>the HTML <code>body</code> element</a> (or null if it does not exist).
933933
This API exists so that Web developers can use it to get the right element to use for scrolling APIs,
934934
without making assumptions about a particular user agent's behavior
935935
or having to invoke a scroll to see which element scrolls the viewport.
936936

937-
Note: <a>The HTML body element</a> is different from HTML's <code>document.body</code>
937+
Note: <a>The HTML <code>body</code> element</a> is different from HTML's <code>document.body</code>
938938
in that the latter can return a <code>frameset</code> element.
939939

940940
The {{CaretPosition}} Interface {#the-caretposition-interface}
@@ -1584,7 +1584,7 @@ generally not listed.
15841584

15851585
<!--
15861586

1587-
* document.viewportElement
1587+
* document.scrollingElement
15881588

15891589
-->
15901590

0 commit comments

Comments
 (0)