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
@@ -12,41 +12,49 @@ Use this if you want the smallest possible bundlesize and is ok with implementin
12
12
13
13
Scrolling SVG elements are supported, as well as Shadow DOM elements. The [VisualViewport](https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport) API is also supported, ensuring scrolling works properly on modern devices. Quirksmode is also supported as long as you polyfill [`document.scrollingElement`](https://developer.mozilla.org/en-US/docs/Web/API/document/scrollingElement).
@@ -61,7 +69,7 @@ actions.forEach(({ el, top, left }) => {
61
69
62
70
## API
63
71
64
-
### computeScrollIntoView(target, options)
72
+
### compute(target, options)
65
73
66
74
### options
67
75
@@ -102,7 +110,7 @@ By passing a boundary you can short-circuit this loop depending on your needs:
102
110
You can also pass a function to do more dynamic checks to override the scroll scoping:
103
111
104
112
```js
105
-
constactions=computeScrollIntoView(target, {
113
+
constactions=compute(target, {
106
114
boundary: (parent) => {
107
115
// By default `overflow: hidden` elements are allowed, only `overflow: visible | clip` is skipped as
108
116
// this is required by the CSSOM spec
@@ -123,11 +131,6 @@ By default the [spec](https://drafts.csswg.org/cssom-view/#scrolling-box) states
123
131
124
132
This package follows the convention [adopted by Firefox](https://hg.mozilla.org/integration/fx-team/rev/c48c3ec05012#l7.18) of setting a boolean option to _not_ scroll all nodes with `overflow: hidden` set.
125
133
126
-
# TypeScript support
127
-
128
-
This library ships with library definitions for TypeScript.
0 commit comments