Skip to content

Commit

Permalink
Adding smoothscroll polyfill for element.scroll* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksrandall authored and JakeChampion committed Oct 30, 2019
1 parent a3c810e commit 37323ce
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ polyfills/Element/prototype/inert/polyfill.js
.nyc_output/
polyfills/String/prototype/normalize/polyfill.js
polyfills/AbortController/polyfill.js
polyfills/smoothscroll/polyfill.js
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@financial-times/polyfill-useragent-normaliser": "^1.2.0",
"@iarna/toml": "^2.2.3",
"@webcomponents/template": "^1.4.0",
"abort-controller": "^2.0.2",
"Base64": "^1.0.0",
"abort-controller": "^2.0.2",
"audio-context-polyfill": "^1.0.0",
"diff": "1.4.0",
"event-source-polyfill": "^0.0.9",
Expand All @@ -68,6 +68,7 @@
"picturefill": "^3.0.1",
"resize-observer-polyfill": "^1.5.1",
"rimraf": "^2.6.2",
"smoothscroll-polyfill": "^0.4.4",
"spdx-licenses": "^1.0.0",
"stream-cache": "^0.0.2",
"stream-from-promise": "^1.0.0",
Expand Down
24 changes: 24 additions & 0 deletions polyfills/smoothscroll/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dependencies = [
"requestAnimationFrame"
]
license = "MIT"
spec = "https://drafts.csswg.org/cssom-view/#smooth-scrolling"
repo = "https://github.com/webcomponents/polyfills/tree/master/packages/template"
docs = "https://developer.mozilla.org/en/docs/Web/CSS/scroll-behavior"

[browsers]
edge = "* - 76"
edge_mob = "*"
ie = "*"
ie_mob = "*"
firefox = "4 - 36"
opera = "*"
safari = "*"
chrome = "* - 60"
ios_saf = "*"
android = "*"

[install]
module = "smoothscroll-polyfill"
paths = [ "dist/smoothscroll.min.js" ]

1 change: 1 addition & 0 deletions polyfills/smoothscroll/detect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'scrollBehavior' in d.documentElement.style

0 comments on commit 37323ce

Please sign in to comment.