The following APIs are supported , and in some cases only partially. For
example, document.createElement() can create currently any type of element,
however only a subset of available classes is supported (listed below). For any
elements that don't yet have a supporting class, an HTMLUnknownElement
instance will be returned. For example, document.createElement('video') will
currently return an instance of HTMLUnknownElement and you will not be able
to use video-specific properties or methods, but you can still set attributes
on the element and you can still pass it around to other DOM APIs.
Please open an issue or PR for any APIs you may need, and we'll prioritize that way.
If a method or property is not listed in the outline, it means we haven't added support for it yet (or someone forgot to update this outline).
ObjecttoString()- Subclasses:
HistorypushState()replaceState()length
CustomElementRegistrydefine()
NodeListHTMLCollectionLocationhrefprotocolhosthostnameportpathnamesearchhashoriginassign()reload()replace()toString()
WebGLRenderingContextattachShaderbindBufferbufferDatabufferDataclearclearColorclearDepthcompileShadercreateBuffercreateProgramcreateShaderdepthFuncdrawArraysenableenableVertexAttribArraygetAttribLocationgetExtensiongetUniformLocationlinkProgramshaderSourceuniformMatrix4fvuseProgramvertexAttribPointer
EventTargetaddEventListenerremoveEventListener- Subclasses:
WindowdocumentcustomElementshistorylocationonclickonpopstate
Nodestatic ELEMENT_NODEstatic ATTRIBUTE_NODEstatic TEXT_NODEstatic CDATA_SECTION_NODEstatic PROCESSING_INSTRUCTION_NODEstatic COMMENT_NODEstatic DOCUMENT_NODEstatic DOCUMENT_TYPE_NODEstatic DOCUMENT_FRAGMENT_NODEnodeTypeparentNodeparentElementchildNodesfirstChildlastChildnextSiblingpreviousSiblingappendChild()removeChild()cloneNode()- Subclasses:
DocumentFragmentchildrenfirstElementChildlastElementChildquerySelector()querySelectorAll()- Subclasses:
ShadowRootinnerHTML
CharacterData- Subclasses:
Text
- Subclasses:
DocumentURLbodylocationcreateElement()createTextNode()childrenfirstElementChildlastElementChildquerySelector()querySelectorAll()
ElementattachShadow()childrenclick()clientHeightclientWidthfirstElementChildgetAttribute()innerHTMLlastElementChildnextElementSiblingonclick(NoEventobject is passed into the callback yet, but at least you can react to a click)previousElementSiblingquerySelector()querySelectorAll()remove()setAttribute()shadowRoottagName- Subclasses:
HTMLElement(<section>and various other elements extend from this)innerText- Subclasses:
HTMLBodyElement(<body>)HTMLDivElement(<div>)HTMLSpanElement(<span>)HTMLParagraphElement(<p>)HTMLAnchorElement(<a>)HTMLScriptElement(<script>)HTMLImageElement/Image(<img>)HTMLAudioElement/Audio(<audio>)play()pause()autoplayHTMLHeadingElement(<h1>-<h6>)HTMLTemplateElement(<template>)contentHTMLUnknownElement(any unrecognized non-hyphenated element)HTMLCanvasElement(<canvas>)getContext()
SVGElement- Subclasses:
SVGSVGElement(<svg>)
In addition to DOM APIs, you might like to use ecmassembly for APIs such as
setTimeout/clearTimeoutrequestAnimationFrame/clearAnimationFramePromise