diff --git a/index.html b/index.html index 1136d210..e8cfcf0c 100644 --- a/index.html +++ b/index.html @@ -4496,27 +4496,43 @@
To scroll into view
- an element
- perform the following steps
- only if the element is not already in view:
+ a node
+ given optional arguments onlyIfNecessary (default true),
+ behavior (default "instant"),
+ block (default "end")
+ and inline (default "nearest"):
Let options be
- the following ScrollIntoViewOptions:
+
Let target be determined as follows: -
behavior"
- instant"
+ Let target be node. + +
If onlyIfNecessary is true + and target is in view, return. +
block"
- end"
+ Let target be a new {{Range}} obtained by calling + {{Document/createRange()}} on node's [=Node/node document=] + and then invoking {{Range/selectNodeContents()}} on it with node + as argument. -
inline"
- nearest"
+ If onlyIfNecessary is true + and target is in view, return. +
Run Function.[[\Call]](scrollIntoView, options) - with element as the this value. +
Scroll target into view + with scroll behavior behavior, + block flow direction position block, + and inline base direction position inline.
Editable elements @@ -4716,6 +4732,46 @@
Return the elements from point given the coordinates center point. + +
A {{Range}} is in view + if the first {{DOMRect}} + returned by calling {{Range/getClientRects()}} on it + overlaps the viewport. + It can be checked this way: + +
Let rectangles be + the {{DOMRect}} sequence + returned by calling {{Range/getClientRects()}} on the {{Range}}. + +
If rectangles has the length of 0, return false. + +
Let rectangle be the first object in rectangles. + +
Return true if all of the following conditions are true, + and false otherwise: +
min(rectangle's x coordinate, + rectangle's x coordinate + + rectangle's width dimension) + is less than innerWidth. + +
max(rectangle's x coordinate, + rectangle's x coordinate + + rectangle's width dimension) + is greater than 0. + +
min(rectangle's y coordinate, + rectangle's y coordinate + + rectangle's height dimension) + is less than innerHeight. + +
max(rectangle's y coordinate, + rectangle's y coordinate + + rectangle's height dimension) + is greater than 0. +
To create a null input source, return a new null input
@@ -7943,8 +8003,9 @@ A key input source supports the same pause action
-as a null input source plus the following actions:
+ A key input source supports the same pause
+and scrollIntoView actions as a null input source
+plus the following actions:
Key input source
-
A pointer input source supports the same pause action as - a null input source plus the following actions: +
A pointer input source supports the same pause + and scrollIntoView actions as a null input source + plus the following actions:
| source type | subtype | Dispatch action algorithm |
|---|---|---|
"none" | "pause" | Dispatch a pause action + |
"none" | "scrollIntoView" | Dispatch a scrollIntoView action |
"key" | "pause" | Dispatch a pause action |
"key" | "keyDown" | Dispatch a keyDown action |
"key" | "keyUp" | Dispatch a keyUp action + |
"key" | "scrollIntoView" | Dispatch a scrollIntoView action |
"pointer" | "pause" | Dispatch a pause action |
"pointer" | "pointerDown" | Dispatch a pointerDown action |
"pointer" | "pointerUp" | Dispatch a pointerUp action |
"pointer" | "pointerMove" | Dispatch a pointerMove action |
"pointer" | "pointerCancel" | Dispatch a pointerCancel action + |
"pointer" | "scrollIntoView" | Dispatch a scrollIntoView action |
"wheel" | "pause" | Dispatch a pause action |
"wheel" | "scroll" | Dispatch a scroll action + |
"wheel" | "scrollIntoView" | Dispatch a scrollIntoView action |
To dispatch a scrollIntoView action given action +object, source, global key state, +tick duration, browsing context, +and actions options: + +
Let node be the result of trying to run
+ actions options' get element origin steps with
+ the node property of action object
+ and browsing context.
+
+
If node is null, return error with + error code no such element. + +
Let onlyIfNecessary be the onlyIfNecessary
+ property of action object.
+
+
Let behavior be the behavior
+ property of action object.
+
+
Let block be the block
+ property of action object.
+
+
Let inline be the inline
+ property of action object.
+
+
Scroll into view node with + onlyIfNecessary, behavior, block, + and inline. + +
ScrollIntoViewOptions
- block"
- inline"
+