Skip to content

Commit

Permalink
feat(polyfill): Adds support for the scroll-behavior CSS property and…
Browse files Browse the repository at this point in the history
… extensions to the Element interface via the polyfill name: 'scroll-behavior'
  • Loading branch information
wessberg committed Jan 11, 2019
1 parent eb40421 commit f5a8957
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,4 @@ And, if you request `performance.now`, `date.now` will also be included since th
- dom-token-list
- object-fit
- console
- scroll-behavior
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"generate:license": "scaffold license",
"generate:contributing": "scaffold contributing",
"generate:coc": "scaffold coc",
"generate:changelog": "standard-changelog",
"generate:changelog": "standard-changelog --first-release",
"generate:all": "npm run generate:license & npm run generate:contributing & npm run generate:coc & npm run generate:readme & npm run generate:changelog",
"clean:dist": "rm -rf dist",
"clean:compiled": "rm -rf compiled",
Expand Down Expand Up @@ -48,12 +48,12 @@
],
"devDependencies": {
"@wessberg/di-compiler": "^2.0.2",
"@wessberg/rollup-plugin-ts": "1.1.16",
"@wessberg/rollup-plugin-ts": "1.1.17",
"@wessberg/scaffold": "^1.0.5",
"@wessberg/ts-config": "^0.0.34",
"rollup": "^1.0.0",
"rollup": "^1.1.0",
"standard-changelog": "^2.0.6",
"tslint": "^5.12.0",
"tslint": "^5.12.1",
"typescript": "^3.2.2",
"useragent-generator": "^1.1.0"
},
Expand All @@ -69,22 +69,22 @@
"@types/node": "^10.12.18",
"@types/semver": "^5.5.0",
"@webcomponents/custom-elements": "^1.2.1",
"@webcomponents/shadydom": "^1.3.1",
"@webcomponents/shadycss": "^1.7.1",
"@webcomponents/shadycss": "^1.8.0",
"@webcomponents/shadydom": "^1.4.1",
"@webcomponents/template": "^1.4.0",
"@wessberg/browserslist-generator": "0.0.56",
"@wessberg/browserslist-generator": "1.0.2",
"@wessberg/di": "^2.0.3",
"@wessberg/fileloader": "^1.1.9",
"@wessberg/filesaver": "^1.0.8",
"@wessberg/pointer-events": "^1.0.7",
"@wessberg/pointer-events": "^1.0.8",
"@wessberg/stringutil": "^1.0.18",
"Base64": "^1.0.1",
"ava": "^1.0.1",
"blob-polyfill": "^3.0.20180112",
"chalk": "^2.4.1",
"chalk": "^2.4.2",
"console-polyfill": "^0.3.0",
"core-js": "^3.0.0-beta.7",
"core-js-builder": "^3.0.0-beta.7",
"core-js": "^3.0.0-beta.8",
"core-js-builder": "^3.0.0-beta.8",
"devcert": "^1.0.0",
"events-polyfill": "^2.1.0",
"file-type": "^10.7.0",
Expand All @@ -105,6 +105,7 @@
"requestanimationframe": "0.0.23",
"requestidlecallback": "^0.3.0",
"resize-observer": "^1.0.0",
"scroll-behavior-polyfill": "^2.0.3",
"semver": "^5.6.0",
"setimmediate": "^1.0.5",
"systemjs": "^2.1.1",
Expand All @@ -115,7 +116,7 @@
"web-animations-js": "^2.3.1",
"whatwg-fetch": "^3.0.0",
"xhr-polyfill": "^0.1.8",
"zone.js": "^0.8.26"
"zone.js": "^0.8.27"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
14 changes: 14 additions & 0 deletions src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2462,6 +2462,20 @@ export const constant: IConstant = {
version: environment.NPM_PACKAGE_DEPENDENCIES_NODE_PARENTELEMENT,
dependencies: ["document"]
},
"scroll-behavior": {
library: "scroll-behavior-polyfill",
relativePaths: ["dist/index.js"],
features: [
"css-scroll-behavior",
"scrollintoview"
],
version: environment.NPM_PACKAGE_DEPENDENCIES_SCROLL_BEHAVIOR_POLYFILL,
dependencies: [
"es.object.define-property",
"es.object.get-own-property-descriptor",
"requestanimationframe"
]
},
"node.contains": {
library: "polyfill-service",
relativePaths: ["polyfills/Node/prototype/contains/polyfill.js"],
Expand Down
1 change: 1 addition & 0 deletions src/environment/environment-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const environmentDefaults = {
NPM_PACKAGE_HOMEPAGE: "",
NPM_PACKAGE_MAIN: "",
NPM_PACKAGE_DEPENDENCIES_INTERSECTION_OBSERVER: "",
NPM_PACKAGE_DEPENDENCIES_SCROLL_BEHAVIOR_POLYFILL: "",
NPM_PACKAGE_DEPENDENCIES_RESIZE_OBSERVER: "",
NPM_PACKAGE_DEPENDENCIES_SETIMMEDIATE: "",
NPM_PACKAGE_DEPENDENCIES_WHATWG_FETCH: "",
Expand Down
1 change: 1 addition & 0 deletions src/polyfill/polyfill-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export declare type PolyfillDealiasedName =
|"window"
|"document"
|"element"
|"scroll-behavior"
|"get-computed-style"
|"node.contains"
|"node.parentelement"
Expand Down

0 comments on commit f5a8957

Please sign in to comment.