@honeo/web-api-polyfill

1.1.0 • Public • Published

web-api-polyfill

なにこれ

自分で使うWebAPIのPolyfill詰め合わせ。

使い方

Babelを通すとコケるかもしれない。

$ npm i @honeo/web-api-polyfill
require('@honeo/web-api-polyfill');

参考

使ってるやつ

自前

document.head
Element.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

requestAnimationFrame

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に固定中。

XMLHttpRequest, FormData

Readme

Keywords

Package Sidebar

Install

npm i @honeo/web-api-polyfill

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

179 kB

Total Files

24

Last publish

Collaborators

  • honeo