export interface DOMAPI { createElement : ( tagName : any , options ? : ElementCreationOptions ) => HTMLElement ; createElementNS : ( namespaceURI : string , qualifiedName : string , options ? : ElementCreationOptions ) => Element ; experimental todo createDocumentFragment ? : ( ) => DocumentFragment ; createTextNode : ( text : string ) => Text ; createComment : ( text : string ) => Comment ; insertBefore : ( parentNode : Node , newNode : Node , referenceNode : Node | null ) => void ; removeChild : ( node : Node , child : Node ) => void ; appendChild : ( node : Node , child : Node ) => void ; parentNode : ( node : Node ) => Node | null ; nextSibling : ( node : Node ) => Node | null ; tagName : ( elm : Element ) => string ; setTextContent : ( node : Node , text : string | null ) => void ; getTextContent : ( node : Node ) => string | null ; isElement : ( node : Node ) => node is Element ; isText : ( node : Node ) => node is Text ; isComment : ( node : Node ) => node is Comment ; experimental todo isDocumentFragment ? : ( node : Node ) => node is DocumentFragment ; } function createElement ( tagName , options ? ) { return document . createElement ( tagName , options ) ; } function createElementNS ( namespaceURI , qualifiedName , options ? ) { return document . createElementNS ( namespaceURI , qualifiedName , options ) ; } function createDocumentFragment ( ) { return document . createDocumentFragment ( ) ; } function createTextNode ( text ) { return document . createTextNode ( text ) ; } function createComment ( text ) { return document . createComment ( text ) ; } function insertBefore ( parentNode , newNode , referenceNode ) { parentNode . insertBefore ( newNode , referenceNode ) ; } function removeChild ( node , child ) { node . removeChild ( child ) ; } function appendChild ( node , child ) { node . appendChild ( child ) ; } function parentNode ( node ) { return node . parentNode ; } function nextSibling ( node ) { return node . nextSibling ; } function tagName ( elm ) { return elm . tagName ; } function setTextContent ( node , text ) { node . textContent = text ; } function getTextContent ( node ) { return node . textContent ; } function isElement ( node ) { return node . nodeType === 1 ; } function isText ( node ) { return node . nodeType === 3 ; } function isComment ( node ) { return node . nodeType === 8 ; } function isDocumentFragment ( node ) { return node . nodeType === 11 ; } export const htmlDomApi = { createElement , createElementNS , createTextNode , createDocumentFragment , createComment , insertBefore , removeChild , appendChild , parentNode , nextSibling , tagName , setTextContent , getTextContent , isElement , isText , isComment , isDocumentFragment , } ;