@@ -839,7 +839,7 @@ partial interface Document {
839
839
Element? elementFromPoint(double x, double y);
840
840
sequence<Element> elementsFromPoint(double x, double y);
841
841
CaretPosition? caretPositionFromPoint(double x, double y);
842
- readonly attribute Element? viewportElement ;
842
+ readonly attribute Element? scrollingElement ;
843
843
};
844
844
</pre>
845
845
@@ -919,22 +919,22 @@ specification and therefore the exact details of
919
919
are therefore too. Hit testing will hopefully be defined in a future
920
920
revision of CSS or HTML.
921
921
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:
923
923
924
924
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.
926
926
1. Return null and abort these steps.
927
927
1. If there is a root element, return the root element and abort these steps.
928
928
1. Return null.
929
929
930
930
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).
933
933
This API exists so that Web developers can use it to get the right element to use for scrolling APIs,
934
934
without making assumptions about a particular user agent's behavior
935
935
or having to invoke a scroll to see which element scrolls the viewport.
936
936
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>
938
938
in that the latter can return a <code> frameset</code> element.
939
939
940
940
The {{CaretPosition}} Interface {#the-caretposition-interface}
@@ -1584,7 +1584,7 @@ generally not listed.
1584
1584
1585
1585
<!--
1586
1586
1587
- * document.viewportElement
1587
+ * document.scrollingElement
1588
1588
1589
1589
-->
1590
1590
0 commit comments