JSPM

@honeo/web-api-polyfill

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q62827F
  • License MIT

WebAPIのPolyfill詰め合わせ

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-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