web-api-polyfill
*
honeo/web-api-polyfill
*
@honeo/web-api-polyfill
なにこれ
自分で使うWebAPIのPolyfill詰め合わせ。
使い方
Babelを通すとコケるかもしれない。
``
sh
$ npm i @honeo/web-api-polyfill
`
`
js
require('@honeo/web-api-polyfill');
``
参考
*
HTML5 Cross Browser Polyfills · Modernizr/Modernizr Wiki
*
Polyfills as a Service
使ってるやつ
$3
document.head
~~Element.prototype.matches~~ => dom4
location.origin
HTMLCollection, NodeListをIterableに。
$3
*
pubkey/broadcast-channel: BroadcastChannel that works in New Browsers, Old Browsers, WebWorkers and NodeJs
$3
*
termi/CSS.supports
$3
*
DOMParser HTML extension - Now a polyfill since HTML parsing was added to the DOMParser specification
$3
*
WebReflection/event-target: The EventTarget Class Polyfill.
$3
*
github/fetch: A window.fetch JavaScript polyfill.
$3
*
WebReflection/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
$3
* ~~
JAK/childNode.js at master · seznam/JAK~~ => dom4
$3
* ~~
eligrey/classList.js~~ => dom4
$3
*
requestAnimationFrame polyfill
* setTimeout実装、dom4内蔵のものはレガシー環境で止まりやすいため。
$3
*
performance.now() polyfill (aka perf.now())
$3
*
lifaon74/url-polyfill: Polyfill URL and URLSearchParams to match last ES7 specifications
$3
*
web-animations/web-animations-js
#### 不具合
* 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に固定中。
$3
*
polyfill/xhr.js at master · inexorabletash/polyfill