Skip to content

Commit

Permalink
feat: Added polyfill support for ResizeObserver
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Oct 8, 2018
1 parent c70a672 commit 2a6b549
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ And, if you request `performance.now`, `date.now` will also be included since th
- document-fragment
- intersection-observer
- mutation-observer
- resize-observer
- custom-elements
- shadow-dom
- template
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"regenerator-runtime": "^0.12.1",
"requestanimationframe": "0.0.23",
"requestidlecallback": "^0.3.0",
"resize-observer": "^1.0.0-alpha.1",
"semver": "^5.5.1",
"systemjs": "^0.21.5",
"temp-dir": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions src/constant/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2557,6 +2557,13 @@ export const constant: IConstant = {
features: ["mutationobserver"],
version: environment.NPM_PACKAGE_DEPENDENCIES_MUTATIONOBSERVER_SHIM,
dependencies: []
},
"resize-observer": {
library: "resize-observer",
relativePaths: ["dist/resize-observer.min.js"],
features: ["resizeobserver"],
version: environment.NPM_PACKAGE_DEPENDENCIES_RESIZE_OBSERVER,
dependencies: ["get-computed-style", "requestanimationframe"]
}
}
};
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_RESIZE_OBSERVER: "",
NPM_PACKAGE_DEPENDENCIES_WHATWG_FETCH: "",
NPM_PACKAGE_DEPENDENCIES__WEBCOMPONENTS_SHADYDOM: "",
NPM_PACKAGE_DEPENDENCIES_POLYFILL_SERVICE: "",
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 @@ -309,6 +309,7 @@ export declare type PolyfillDealiasedName =
|"document-fragment"
|"intersection-observer"
|"mutation-observer"
|"resize-observer"
|"custom-elements"
|"shadow-dom"
|"template"
Expand Down

0 comments on commit 2a6b549

Please sign in to comment.