Package Exports
- @honeo/web-api-polyfill
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@honeo/web-api-polyfill) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
web-api-polyfill
なにこれ
自分で使うWebAPIのPolyfill詰め合わせ。
使い方
Babelを通すとコケるかもしれない。
$ npm i @honeo/web-api-polyfillrequire('@honeo/web-api-polyfill');参考
使ってるやつ
自前
document.headElement.prototype.matches => dom4
location.origin
HTMLCollection, NodeListをIterableに。
BroadcastChannel
CSS.supports
DOMParser
EventTarget
fetch
dom4
DOM Lv.4その他。
不具合
Firefox拡張機能のContentsScript内コンテキストではパーミッションエラーが出て動作しない。
ParentNode
ParentNode.prepend(), ParentNode.appnd(), ParentNode.query(), ParentNode.queryAll()
ChildNode
ChildNode.before(), ChildNode.after(), ChildNode.replaceWith(), ChildNode.remove()
Element
Element#classList, Element#matches(), Element#closest()
Event
add,removeEventListener(,,object)
Other
requestAnimationFrame() => requestAnimationFrame polyfill
ChildNode
classList
eligrey/classList.js=> dom4
requestAnimationFrame
- requestAnimationFrame polyfill
- setTimeout実装、dom4内蔵のものはレガシー環境で止まりやすいため。
performance.now()
URL
Web Animations API
不具合
- Firefox v~57
- SDK, WebExtensionsともに、拡張機能のContentsScript内コンテキストではパーミッションエラーが出て動作しない。
- Safari
- Safari v5.1.7とPolyfill v2.2.2で[TypeError: setting a property that has only a getter]が発生する。
- Polyfill v2.2.1に固定中。