diff --git a/package.json b/package.json index 3a00e83..37a15e2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ }, "dependencies": { "hyperx-tmp": "^2.5.4", - "resize-observer-polyfill": "^1.5.1", "snabbdom": "^3.0.3" }, "engines": { diff --git a/readme.md b/readme.md index b54ef79..a67146a 100644 --- a/readme.md +++ b/readme.md @@ -67,7 +67,7 @@ html`
Some conte If the div is 700px wide, it will have `BP2` in it's classlist. Only the class with the highest matching rule will be added, regardless of what order the rules are declared in. -Internally, this is implemented with a ResizeObserver, and that is ponyfilled to support older browsers. +Internally, this is implemented with a ResizeObserver. As of version 5, we no longer bundle a ResizeObserver ponyfill with snabby. You should polyfill ResizeObserver yourself if you plan on using snabby on very old browsers. https://www.npmjs.com/package/resize-observer-polyfill ### Directives diff --git a/snabbdom-containerquery.js b/snabbdom-containerquery.js index caa38b5..5ee30c4 100644 --- a/snabbdom-containerquery.js +++ b/snabbdom-containerquery.js @@ -1,15 +1,5 @@ // inspired by https://philipwalton.com/articles/responsive-components-a-solution-to-the-container-queries-problem/ -// ResizeObserver support is pretty good, but about 10% of the browsers still lack it. -// in some cases, snabbdom is used as a 3rd party module that gets used on websites, -// and it's unacceptable in some cases to install global polyfills. -// -// for now we inline it into the plugin as a ponyfill so that it's always available, -// doesn't pollute global scope, and works in almost all in-use browsers, at the cost of a few kb. -// -// https://github.com/que-etc/resize-observer-polyfill -import ResizeObserver from 'resize-observer-polyfill'; - // today it's more performant to have 1 resizeObserver observe multiple elements rather than 1 per element. // see https://groups.google.com/a/chromium.org/g/blink-dev/c/z6ienONUb5A/m/F5-VcUZtBAAJ