@esfx/collection-core-dom-shim Package
Provides a global shim to add default @esfx/collection-core behaviors to global DOM objects.
Installation
npm i @esfx/collection-core-dom-shim
Usage
import "@esfx/collection-core-dom-shim"; // triggers global-scope side effects
import { ReadonlyIndexedCollection } from "@esfx/collection-core";
document.forms[ReadonlyIndexedCollection.size]; // gets the number of forms in the document
Remarks
This shim adds a default implementation of the collection interfaces to the following global DOM objects:
- AudioParamMap implements:
- AudioTrackList implements:
- CSSRuleList implements:
- CSSStyleDeclaration implements:
- DOMRectList implements:
- DOMStringList implements:
- DOMTokenList implements:
- DataTransferItemList implements:
- FileList implements:
- FormData implements:
HTMLAllCollection
implements:HTMLCollectionBase
implements:HTMLCollectionOf
implements:- HTMLFormElement implements:
- HTMLSelectElement implements:
- Headers implements:
- MediaKeyStatusMap implements:
- MediaList implements:
- MimeTypeArray implements:
- NamedNodeMap implements:
- NodeList implements:
- Plugin implements:
- PluginArray implements:
- RTCStatsReport implements:
- SVGLengthList implements:
- SVGNumberList implements:
- SVGStringList implements:
- SourceBufferList implements:
- SpeechGrammarList implements:
- SpeechRecognitionResult implements:
- SpeechRecognitionResultList implements:
- StyleSheetList implements:
- TextTrackCueList implements:
- TextTrackList implements:
- TouchList implements:
- URLSearchParams implements:
- VideoTrackList implements: