From d8e2270a3d79418d5f38f7ab52b369c48edb1ae9 Mon Sep 17 00:00:00 2001 From: Fernando Isidro Luna Date: Mon, 14 Oct 2024 18:05:22 -0600 Subject: [PATCH] chore(release): :tada: 0.6.2 --- CHANGELOG.md | 11 +- docs/assets/icons.js | 2 +- docs/assets/icons.svg | 2 +- docs/assets/main.js | 2 +- docs/assets/style.css | 87 ++++++-- docs/classes/index.DOMImplementation.html | 12 +- docs/classes/index.DOMParser.html | 8 +- docs/classes/index.XMLSerializer.html | 4 +- .../xml_nodes_xml_attributes.default.html | 4 +- docs/classes/xml_nodes_xml_node.default.html | 4 +- .../xml_nodes_xml_node_exporter.default.html | 4 +- .../xml_nodes_xml_node_importer.default.html | 4 +- docs/classes/xml_nodes_xml_nodes.default.html | 116 +++++------ .../xml_nodes_xml_nodes_sorter.default.html | 4 +- docs/functions/dom.getDomImplementation.html | 2 +- docs/functions/dom.getParser.html | 2 +- docs/functions/dom.getSerializer.html | 2 +- docs/functions/dom.isAttribute.html | 2 +- docs/functions/dom.isDocument.html | 2 +- docs/functions/dom.isElement.html | 2 +- docs/functions/dom.isNode.html | 2 +- docs/functions/dom.isText.html | 2 +- docs/functions/index.Attr-1.html | 6 +- docs/functions/index.Document-1.html | 4 +- docs/functions/index.Element-1.html | 6 +- docs/functions/index.Node-1.html | 30 +-- docs/functions/index.Text-1.html | 6 +- docs/functions/index.onErrorStopParsing.html | 4 +- docs/functions/utils_number.formatNumber.html | 2 +- docs/functions/utils_number.roundNumber.html | 2 +- docs/functions/utils_number.toFloat.html | 2 +- .../functions/utils_xml.createDomElement.html | 2 +- docs/functions/utils_xml.createElement.html | 2 +- docs/functions/utils_xml.documentElement.html | 2 +- docs/functions/utils_xml.isValidXmlName.html | 2 +- docs/functions/utils_xml.newDocument.html | 2 +- .../utils_xml.newDocumentContent.html | 2 +- docs/functions/utils_xml.ownerDocument.html | 2 +- ...des_xml_node_utils.nodeFromXmlElement.html | 2 +- ...odes_xml_node_utils.nodeFromXmlString.html | 2 +- ...nodes_xml_node_utils.nodeToXmlElement.html | 2 +- ..._nodes_xml_node_utils.nodeToXmlString.html | 2 +- docs/hierarchy.html | 2 +- docs/index.html | 4 +- docs/interfaces/index.Attr.html | 110 +++++------ docs/interfaces/index.Document.html | 138 ++++++------- docs/interfaces/index.Element.html | 142 ++++++------- docs/interfaces/index.Node.html | 102 +++++----- docs/interfaces/index.Text.html | 118 +++++------ docs/interfaces/types.XmlNodeInterface.html | 4 +- docs/modules.html | 186 ++++++++++++++++++ docs/modules/dom.html | 4 +- docs/modules/index.html | 4 +- docs/modules/types.html | 4 +- docs/modules/utils_number.html | 4 +- docs/modules/utils_xml.html | 4 +- docs/modules/xml_nodes_xml_attributes.html | 4 +- docs/modules/xml_nodes_xml_node.html | 4 +- docs/modules/xml_nodes_xml_node_exporter.html | 4 +- docs/modules/xml_nodes_xml_node_importer.html | 4 +- docs/modules/xml_nodes_xml_node_utils.html | 4 +- docs/modules/xml_nodes_xml_nodes.html | 4 +- docs/modules/xml_nodes_xml_nodes_sorter.html | 4 +- docs/types/index.MIME_TYPE.html | 4 +- docs/types/index.NAMESPACE.html | 4 +- docs/variables/index.MIME_TYPE-1.html | 4 +- docs/variables/index.NAMESPACE-1.html | 4 +- package.json | 2 +- 68 files changed, 737 insertions(+), 499 deletions(-) create mode 100644 docs/modules.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2c2b8..96fda18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v0.6.1](https://luffynando.github.com/nodecfdi/cfdi-core/compare/v0.6.0...v0.6.1) +## [v0.6.2](https://luffynando.github.com/nodecfdi/cfdi-core/compare/v0.6.1...v0.6.2) + +### Commits + +- chore: :arrow_up: update dependencies [`4d6e4eb`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/4d6e4ebc4a5e59fb9199af5143c47328d707f122) +- style: :rotating_light: enable sonarjs in eslint and resolve all issues reported by eslint [`e36e9a6`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/e36e9a6e46e6abb20e6ea01ed6b17ae517537aa8) + +## [v0.6.1](https://luffynando.github.com/nodecfdi/cfdi-core/compare/v0.6.0...v0.6.1) - 2024-10-04 ### Commits - refactor: :recycle: remove old doc generate files [`81c252d`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/81c252d7c1b99787bc50af0a274970255128ad82) +- chore(release): :tada: 0.6.1 [`ae3b891`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/ae3b891cff748e84b9a030697b204b8749522242) - perf: :zap: remove unnecessary export package.json file [`af6403b`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/af6403b65c0caf962835f8f89417cf54e11fca16) -- style: :rotating_light: resolve issue reported by sonarcloud for readonly property [`f676552`](https://luffynando.github.com/nodecfdi/cfdi-core/commit/f6765526ef5b9dc471346e8c6c5eb129da4a6752) ## [v0.6.0](https://luffynando.github.com/nodecfdi/cfdi-core/compare/v0.5.1...v0.6.0) - 2024-10-04 diff --git a/docs/assets/icons.js b/docs/assets/icons.js index e88e8ca..3dfbd32 100644 --- a/docs/assets/icons.js +++ b/docs/assets/icons.js @@ -3,7 +3,7 @@ function addIcons() { if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons); const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg")); - svg.innerHTML = `""`; + svg.innerHTML = `MMNEPVFCICPMFPCPTTAAATR`; svg.style.display = "none"; if (location.protocol === "file:") updateUseElements(); } diff --git a/docs/assets/icons.svg b/docs/assets/icons.svg index e371b8b..a19417d 100644 --- a/docs/assets/icons.svg +++ b/docs/assets/icons.svg @@ -1 +1 @@ - \ No newline at end of file +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/docs/assets/main.js b/docs/assets/main.js index 21a5d74..99097a0 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -3,7 +3,7 @@ window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This me "use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. `,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` ${he(l.parent,i)}.${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`${ee(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&","<":"<",">":">","'":"'",'"':"""};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else{let r=e.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=t.text}}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/docs/assets/style.css b/docs/assets/style.css index 9d619a6..178bfb0 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -4,11 +4,17 @@ --light-color-background-secondary: #eff0f1; --light-color-warning-text: #222; --light-color-background-warning: #e6e600; - --light-color-icon-background: var(--light-color-background); --light-color-accent: #c5c7c9; --light-color-active-menu-item: var(--light-color-accent); --light-color-text: #222; --light-color-text-aside: #6e6e6e; + + --light-color-icon-background: var(--light-color-background); + --light-color-icon-text: var(--light-color-text); + + --light-color-comment-tag-text: var(--light-color-text); + --light-color-comment-tag: var(--light-color-background); + --light-color-link: #1f70c2; --light-color-focus-outline: #3584e4; @@ -22,16 +28,17 @@ --light-color-ts-function: #572be7; --light-color-ts-class: #1f70c2; --light-color-ts-interface: #108024; - --light-color-ts-constructor: var(--light-color-ts-class); - --light-color-ts-property: var(--light-color-ts-variable); - --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-constructor: #4d7fff; + --light-color-ts-property: #ff984d; + --light-color-ts-method: #ff4db8; + --light-color-ts-reference: #ff4d82; --light-color-ts-call-signature: var(--light-color-ts-method); --light-color-ts-index-signature: var(--light-color-ts-property); --light-color-ts-constructor-signature: var(--light-color-ts-constructor); --light-color-ts-parameter: var(--light-color-ts-variable); /* type literal not included as links will never be generated to it */ --light-color-ts-type-parameter: #a55c0e; - --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-accessor: #ff4d4d; --light-color-ts-get-signature: var(--light-color-ts-accessor); --light-color-ts-set-signature: var(--light-color-ts-accessor); --light-color-ts-type-alias: #d51270; @@ -46,11 +53,17 @@ --dark-color-background-secondary: #1e2024; --dark-color-background-warning: #bebe00; --dark-color-warning-text: #222; - --dark-color-icon-background: var(--dark-color-background-secondary); --dark-color-accent: #9096a2; --dark-color-active-menu-item: #5d5d6a; --dark-color-text: #f5f5f5; --dark-color-text-aside: #dddddd; + + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-icon-text: var(--dark-color-text); + + --dark-color-comment-tag-text: var(--dark-color-text); + --dark-color-comment-tag: var(--dark-color-background); + --dark-color-link: #00aff4; --dark-color-focus-outline: #4c97f2; @@ -64,16 +77,17 @@ --dark-color-ts-function: #a280ff; --dark-color-ts-class: #8ac4ff; --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: var(--dark-color-ts-class); - --dark-color-ts-property: var(--dark-color-ts-variable); - --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-constructor: #4d7fff; + --dark-color-ts-property: #ff984d; + --dark-color-ts-method: #ff4db8; + --dark-color-ts-reference: #ff4d82; --dark-color-ts-call-signature: var(--dark-color-ts-method); --dark-color-ts-index-signature: var(--dark-color-ts-property); --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); --dark-color-ts-parameter: var(--dark-color-ts-variable); /* type literal not included as links will never be generated to it */ --dark-color-ts-type-parameter: #e07d13; - --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-accessor: #ff4d4d; --dark-color-ts-get-signature: var(--dark-color-ts-accessor); --dark-color-ts-set-signature: var(--dark-color-ts-accessor); --dark-color-ts-type-alias: #ff6492; @@ -90,15 +104,22 @@ --color-background-secondary: var(--light-color-background-secondary); --color-background-warning: var(--light-color-background-warning); --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); + + --color-icon-background: var(--light-color-icon-background); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + --color-link: var(--light-color-link); --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -110,6 +131,7 @@ --color-ts-constructor: var(--light-color-ts-constructor); --color-ts-property: var(--light-color-ts-property); --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); --color-ts-call-signature: var(--light-color-ts-call-signature); --color-ts-index-signature: var(--light-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -134,15 +156,22 @@ --color-background-secondary: var(--dark-color-background-secondary); --color-background-warning: var(--dark-color-background-warning); --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); + + --color-icon-background: var(--dark-color-icon-background); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + --color-link: var(--dark-color-link); --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -154,6 +183,7 @@ --color-ts-constructor: var(--dark-color-ts-constructor); --color-ts-property: var(--dark-color-ts-property); --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); --color-ts-call-signature: var(--dark-color-ts-call-signature); --color-ts-index-signature: var(--dark-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -190,10 +220,16 @@ body { --color-active-menu-item: var(--light-color-active-menu-item); --color-text: var(--light-color-text); --color-text-aside: var(--light-color-text-aside); + --color-icon-text: var(--light-color-icon-text); + + --color-comment-tag-text: var(--light-color-text); + --color-comment-tag: var(--light-color-background); + --color-link: var(--light-color-link); --color-focus-outline: var(--light-color-focus-outline); --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-project: var(--light-color-ts-project); --color-ts-module: var(--light-color-ts-module); --color-ts-namespace: var(--light-color-ts-namespace); --color-ts-enum: var(--light-color-ts-enum); @@ -205,6 +241,7 @@ body { --color-ts-constructor: var(--light-color-ts-constructor); --color-ts-property: var(--light-color-ts-property); --color-ts-method: var(--light-color-ts-method); + --color-ts-reference: var(--light-color-ts-reference); --color-ts-call-signature: var(--light-color-ts-call-signature); --color-ts-index-signature: var(--light-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -232,10 +269,16 @@ body { --color-active-menu-item: var(--dark-color-active-menu-item); --color-text: var(--dark-color-text); --color-text-aside: var(--dark-color-text-aside); + --color-icon-text: var(--dark-color-icon-text); + + --color-comment-tag-text: var(--dark-color-text); + --color-comment-tag: var(--dark-color-background); + --color-link: var(--dark-color-link); --color-focus-outline: var(--dark-color-focus-outline); --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-project: var(--dark-color-ts-project); --color-ts-module: var(--dark-color-ts-module); --color-ts-namespace: var(--dark-color-ts-namespace); --color-ts-enum: var(--dark-color-ts-enum); @@ -247,6 +290,7 @@ body { --color-ts-constructor: var(--dark-color-ts-constructor); --color-ts-property: var(--dark-color-ts-property); --color-ts-method: var(--dark-color-ts-method); + --color-ts-reference: var(--dark-color-ts-reference); --color-ts-call-signature: var(--dark-color-ts-call-signature); --color-ts-index-signature: var(--dark-color-ts-index-signature); --color-ts-constructor-signature: var( @@ -439,7 +483,6 @@ pre { pre { position: relative; - white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 10px; @@ -860,6 +903,12 @@ a.tsd-index-link { margin-bottom: 0.75rem; } +.tsd-no-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} .tsd-kind-icon { margin-right: 0.5rem; width: 1.25rem; @@ -867,10 +916,6 @@ a.tsd-index-link { min-width: 1.25rem; min-height: 1.25rem; } -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} .tsd-signature > .tsd-kind-icon { margin-right: 0.8rem; } @@ -1242,6 +1287,9 @@ img { .tsd-kind-method { color: var(--color-ts-method); } +.tsd-kind-reference { + color: var(--color-ts-reference); +} .tsd-kind-call-signature { color: var(--color-ts-call-signature); } @@ -1254,9 +1302,6 @@ img { .tsd-kind-parameter { color: var(--color-ts-parameter); } -.tsd-kind-type-literal { - color: var(--color-ts-type-literal); -} .tsd-kind-type-parameter { color: var(--color-ts-type-parameter); } @@ -1435,7 +1480,7 @@ img { } .site-menu { - margin-top: 1rem 0; + margin-top: 1rem; } .page-menu, diff --git a/docs/classes/index.DOMImplementation.html b/docs/classes/index.DOMImplementation.html index a6e0448..e68625a 100644 --- a/docs/classes/index.DOMImplementation.html +++ b/docs/classes/index.DOMImplementation.html @@ -156,7 +156,7 @@ --md-sys-color-surface-container-high: #eae8e0; --md-sys-color-surface-container-highest: #e4e3db } -

Constructors

constructor +

Methods

  • Creates an XML Document object of the specified type with its document element.

    +

Methods

  • Creates an XML Document object of the specified type with its document element.

    It behaves slightly different from the description in the living standard:

    -
  • Returns a doctype, with the given qualifiedName, publicId, and systemId.

    +
  • Returns a doctype, with the given qualifiedName, publicId, and systemId.

    This behavior is slightly different from the in the specs:

    -
  • Returns an HTML document, that might already have a basic DOM structure.

    +
  • The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given +

  • The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. The different implementations fairly diverged in what kind of features were reported. The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use.

    @@ -227,7 +227,7 @@ Core
  • https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard
-

The DOMParser interface provides the ability to parse XML or HTML source code from a string +

The DOMParser interface provides the ability to parse XML or HTML source code from a string into a DOM Document.

xmldom is different from the spec in that it allows an options parameter, to control the behavior..

@@ -164,7 +164,7 @@
  • https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
  • https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization
  • -

    Constructors

    Constructors

    Methods

    Constructors

    -

    Methods

    • Parses source using the options in the way configured by the DOMParserOptions of +

    Methods

    -

    Constructors

    constructor +

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • node: Node
      • OptionalnodeFilter: ((node: Node) => boolean)
          • (node): boolean
          • Parameters

            Returns boolean

      Returns string

    Constructors

    constructor +

    Constructors

    Properties

    Accessors

    length size @@ -173,7 +173,7 @@ keys set values -

    Constructors

    Properties

    [toStringTag]: "XmlAttributes" = 'XmlAttributes'

    Accessors

    Methods

    • Parameters

      • callbackFn: ((value: string, key: string, map: Map<string, string>) => void)
          • (value, key, map): void
          • Parameters

            • value: string
            • key: string
            • map: Map<string, string>

            Returns void

      • OptionalthisArgument: unknown

      Returns void

    Implements

    Constructors

    constructor +

    Implements

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    Constructors

    constructor +

    Constructors

    Methods

    Constructors

    Methods

    Constructors

    constructor +

    Constructors

    Methods

    Constructors

    Methods

    Hierarchy

    Constructors

    constructor +

    Hierarchy

    Constructors

    Properties

    Accessors

    [species] @@ -215,142 +215,142 @@ fromAsync isArray of -

    Constructors

    Properties

    [unscopables]: {
        [unscopables]?: boolean;
        length?: boolean;
        [iterator]?: any;
        at?: any;
        concat?: any;
        copyWithin?: any;
        entries?: any;
        every?: any;
        fill?: any;
        filter?: any;
        find?: any;
        findIndex?: any;
        findLast?: any;
        findLastIndex?: any;
        flat?: any;
        flatMap?: any;
        forEach?: any;
        includes?: any;
        indexOf?: any;
        join?: any;
        keys?: any;
        lastIndexOf?: any;
        map?: any;
        pop?: any;
        push?: any;
        reduce?: any;
        reduceRight?: any;
        reverse?: any;
        shift?: any;
        slice?: any;
        some?: any;
        sort?: any;
        splice?: any;
        toLocaleString?: any;
        toReversed?: any;
        toSorted?: any;
        toSpliced?: any;
        toString?: any;
        unshift?: any;
        values?: any;
        with?: any;
    }

    Is an object whose properties have the value 'true' +

    Constructors

    Properties

    [unscopables]: {
        [unscopables]?: boolean;
        length?: boolean;
        [iterator]?: any;
        at?: any;
        concat?: any;
        copyWithin?: any;
        entries?: any;
        every?: any;
        fill?: any;
        filter?: any;
        find?: any;
        findIndex?: any;
        findLast?: any;
        findLastIndex?: any;
        flat?: any;
        flatMap?: any;
        forEach?: any;
        includes?: any;
        indexOf?: any;
        join?: any;
        keys?: any;
        lastIndexOf?: any;
        map?: any;
        pop?: any;
        push?: any;
        reduce?: any;
        reduceRight?: any;
        reverse?: any;
        shift?: any;
        slice?: any;
        some?: any;
        sort?: any;
        splice?: any;
        toLocaleString?: any;
        toReversed?: any;
        toSorted?: any;
        toSpliced?: any;
        toString?: any;
        unshift?: any;
        values?: any;
        with?: any;
    }

    Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

    Type declaration

    • Optional Readonly[unscopables]?: boolean

      Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

    • Optionallength?: boolean

      Gets or sets the length of the array. This is a number one higher than the highest index in the array.

      -
    length: number

    Gets or sets the length of the array. This is a number one higher than the highest index in the array.

    -

    Accessors

    Methods

    • Iterator

      -

      Returns ArrayIterator<XmlNodeInterface>

    • Returns the item located at the specified index.

      +
    length: number

    Gets or sets the length of the array. This is a number one higher than the highest index in the array.

    +

    Accessors

    Methods

    • Iterator

      +

      Returns ArrayIterator<XmlNodeInterface>

    • Returns the item located at the specified index.

      Parameters

      • index: number

        The zero-based index of the desired code unit. A negative index will count back from the last item.

        -

      Returns undefined | XmlNodeInterface

    Returns undefined | XmlNodeInterface

    • Combines two or more arrays. This method returns a new array without modifying any existing arrays.

      Parameters

      • Rest...items: ConcatArray<XmlNodeInterface>[]

        Additional arrays and/or items to add to the end of the array.

        -

      Returns XmlNodeInterface[]

    • Combines two or more arrays. +

    Returns XmlNodeInterface[]

  • Combines two or more arrays. This method returns a new array without modifying any existing arrays.

    Parameters

    Returns XmlNodeInterface[]

    • Returns the this object after copying a section of the array identified by start and end +

    Returns XmlNodeInterface[]

    • Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

      Parameters

      • target: number

        If target is negative, it is treated as length+target where length is the length of the array.

      • start: number

        If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

      • Optionalend: number

        If not specified, length of the this object is used as its default value.

        -

      Returns this

    • Returns an iterable of key, value pairs for every entry in the array

      -

      Returns ArrayIterator<[number, XmlNodeInterface]>

    • Determines whether all the members of an array satisfy the specified test.

      +

    Returns this

    • Returns an iterable of key, value pairs for every entry in the array

      +

      Returns ArrayIterator<[number, XmlNodeInterface]>

    • Determines whether all the members of an array satisfy the specified test.

      Type Parameters

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => value is S)

        A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns this is S[]

    • Determines whether all the members of an array satisfy the specified test.

      +

    Returns this is S[]

  • Determines whether all the members of an array satisfy the specified test.

    Parameters

    • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => unknown)

      A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

    • OptionalthisArg: any

      An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

      -

    Returns boolean

    • Changes all array elements from start to end index to a static value and returns the modified array

      +

    Returns boolean

    • Changes all array elements from start to end index to a static value and returns the modified array

      Parameters

      • value: XmlNodeInterface

        value to fill array section with

      • Optionalstart: number

        index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.

      • Optionalend: number

        index to stop filling the array at. If end is negative, it is treated as length+end.

        -

      Returns this

    • Returns the elements of an array that meet the condition specified in a callback function.

      +

    Returns this

    • Returns the elements of an array that meet the condition specified in a callback function.

      Type Parameters

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => value is S)

        A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns S[]

    • Returns the elements of an array that meet the condition specified in a callback function.

      +

    Returns S[]

  • Returns the elements of an array that meet the condition specified in a callback function.

    Parameters

    • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => unknown)

      A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

    • OptionalthisArg: any

      An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

      -

    Returns XmlNodeInterface[]

    • Returns the value of the first element in the array where predicate is true, and undefined +

    Returns XmlNodeInterface[]

    • Returns the value of the first element in the array where predicate is true, and undefined otherwise.

      Type Parameters

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, obj: XmlNodeInterface[]) => value is S)

        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns undefined | S

    • Parameters

      Returns undefined | XmlNodeInterface

    • Returns the index of the first element in the array where predicate is true, and -1 +

    Returns undefined | S

  • Parameters

    Returns undefined | XmlNodeInterface

    • Returns the index of the first element in the array where predicate is true, and -1 otherwise.

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, obj: XmlNodeInterface[]) => unknown)

        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns number

    • Returns the value of the last element in the array where predicate is true, and undefined +

    Returns number

    • Returns the value of the last element in the array where predicate is true, and undefined otherwise.

      Type Parameters

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => value is S)

        findLast calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLast immediately returns that element value. Otherwise, findLast returns undefined.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns undefined | S

    • Parameters

      Returns undefined | XmlNodeInterface

    • Returns the index of the last element in the array where predicate is true, and -1 +

    Returns undefined | S

  • Parameters

    Returns undefined | XmlNodeInterface

    • Returns the index of the last element in the array where predicate is true, and -1 otherwise.

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => unknown)

        findLastIndex calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.

      • OptionalthisArg: any

        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.

        -

      Returns number

    • Returns a new array with all sub-array elements concatenated into it recursively up to the +

    Returns number

    • Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

      Type Parameters

      • A
      • D extends number = 1

      Parameters

      • this: A
      • Optionaldepth: D

        The maximum recursion depth

        -

      Returns FlatArray<A, D>[]

    • Calls a defined callback function on each element of an array. Then, flattens the result into +

    Returns FlatArray<A, D>[]

    • Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.

      Type Parameters

      • U
      • This = undefined

      Parameters

      • callback: ((this: This, value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => U | readonly U[])

        A function that accepts up to three arguments. The flatMap method calls the callback function one time for each element in the array.

      • OptionalthisArg: This

        An object to which the this keyword can refer in the callback function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns U[]

    • Performs the specified action for each element in an array.

      +

    Returns U[]

    • Performs the specified action for each element in an array.

      Parameters

      • callbackfn: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => void)

        A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns void

    • Determines whether an array includes a certain element, returning true or false as appropriate.

      +

    Returns void

    • Determines whether an array includes a certain element, returning true or false as appropriate.

      Parameters

      • searchElement: XmlNodeInterface

        The element to search for.

      • OptionalfromIndex: number

        The position in this array at which to begin searching for searchElement.

        -

      Returns boolean

    • Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

      +

    Returns boolean

    • Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

      Parameters

      • searchElement: XmlNodeInterface

        The value to locate in the array.

      • OptionalfromIndex: number

        The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

        -

      Returns number

    • Adds all the elements of an array into a string, separated by the specified separator string.

      +

    Returns number

    • Adds all the elements of an array into a string, separated by the specified separator string.

      Parameters

      • Optionalseparator: string

        A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.

        -

      Returns string

    • Returns an iterable of keys in the array

      -

      Returns ArrayIterator<number>

    • Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

      +

    Returns string

    • Returns an iterable of keys in the array

      +

      Returns ArrayIterator<number>

    • Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

      Parameters

      • searchElement: XmlNodeInterface

        The value to locate in the array.

      • OptionalfromIndex: number

        The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.

        -

      Returns number

    • Calls a defined callback function on each element of an array, and returns an array that contains the results.

      +

    Returns number

    • Calls a defined callback function on each element of an array, and returns an array that contains the results.

      Type Parameters

      • U

      Parameters

      • callbackfn: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => U)

        A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns U[]

    • Removes the last element from an array and returns it. +

    Returns U[]

    • Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

      -

      Returns undefined | XmlNodeInterface

    • Appends new elements to the end of an array, and returns the new length of the array.

      +

      Returns undefined | XmlNodeInterface

    • Appends new elements to the end of an array, and returns the new length of the array.

      Parameters

      Returns number

    • Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      +

    Returns number

    Returns XmlNodeInterface

  • Parameters

    Returns XmlNodeInterface

  • Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    Type Parameters

    • U

    Parameters

    • callbackfn: ((previousValue: U, currentValue: XmlNodeInterface, currentIndex: number, array: XmlNodeInterface[]) => U)

      A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

    • initialValue: U

      If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

      -

    Returns U

    • Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

      +

    Returns U

    Returns XmlNodeInterface

  • Parameters

    Returns XmlNodeInterface

  • Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    Type Parameters

    • U

    Parameters

    • callbackfn: ((previousValue: U, currentValue: XmlNodeInterface, currentIndex: number, array: XmlNodeInterface[]) => U)

      A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

    • initialValue: U

      If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

      -

    Returns U

  • Returns U

    • Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.

      -

      Returns XmlNodeInterface[]

    • It takes only the unique string names and sort using the order of appearance.

      -

      Parameters

      • names: string[]

      Returns void

    • Removes the first element from an array and returns it. +

      Returns XmlNodeInterface[]

    • It takes only the unique string names and sort using the order of appearance.

      +

      Parameters

      • names: string[]

      Returns void

    • Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

      -

      Returns undefined | XmlNodeInterface

    • Returns a copy of a section of an array. +

      Returns undefined | XmlNodeInterface

    • Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.

      Parameters

      • Optionalstart: number

        The beginning index of the specified portion of the array. If start is undefined, then the slice begins at index 0.

      • Optionalend: number

        The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. If end is undefined, then the slice extends to the end of the array.

        -

      Returns XmlNodeInterface[]

    • Determines whether the specified callback function returns true for any element of an array.

      +

    Returns XmlNodeInterface[]

    • Determines whether the specified callback function returns true for any element of an array.

      Parameters

      • predicate: ((value: XmlNodeInterface, index: number, array: XmlNodeInterface[]) => unknown)

        A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.

      • OptionalthisArg: any

        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.

        -

      Returns boolean

    • Sorts an array in place. +

    Returns boolean

    • Sorts an array in place. This method mutates the array and returns a reference to the same array.

      Parameters

      • OptionalcompareFn: ((a: XmlNodeInterface, b: XmlNodeInterface) => number)

        Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive @@ -358,64 +358,64 @@

        [11,2,22,1].sort((a, b) => a - b)
         
        -

      Returns this

    • Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

      +

    Returns this

    • Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

      Parameters

      • start: number

        The zero-based location in the array from which to start removing elements.

      • OptionaldeleteCount: number

        The number of elements to remove.

      Returns XmlNodeInterface[]

      An array containing the elements that were deleted.

      -
    • Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

      +
    • Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

      Parameters

      • start: number

        The zero-based location in the array from which to start removing elements.

      • deleteCount: number

        The number of elements to remove.

      • Rest...items: XmlNodeInterface[]

        Elements to insert into the array in place of the deleted elements.

      Returns XmlNodeInterface[]

      An array containing the elements that were deleted.

      -
    • Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.

      -

      Returns string

    • Parameters

      • locales: string | string[]
      • Optionaloptions: NumberFormatOptions & DateTimeFormatOptions

      Returns string

    • Returns a copy of an array with its elements reversed.

      -

      Returns XmlNodeInterface[]

    • Returns a copy of an array with its elements sorted.

      +
    • Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.

      +

      Returns string

    • Parameters

      • locales: string | string[]
      • Optionaloptions: NumberFormatOptions & DateTimeFormatOptions

      Returns string

    • Returns a copy of an array with its elements reversed.

      +

      Returns XmlNodeInterface[]

    • Returns a copy of an array with its elements sorted.

      Parameters

      • OptionalcompareFn: ((a: XmlNodeInterface, b: XmlNodeInterface) => number)

        Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.

        [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
         
        -

      Returns XmlNodeInterface[]

    • Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.

      +

    Returns XmlNodeInterface[]

    • Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.

      Parameters

      • start: number

        The zero-based location in the array from which to start removing elements.

      • deleteCount: number

        The number of elements to remove.

      • Rest...items: XmlNodeInterface[]

        Elements to insert into the copied array in place of the deleted elements.

      Returns XmlNodeInterface[]

      The copied array.

      -
    • Copies an array and removes elements while returning the remaining elements.

      +
    • Copies an array and removes elements while returning the remaining elements.

      Parameters

      • start: number

        The zero-based location in the array from which to start removing elements.

      • OptionaldeleteCount: number

        The number of elements to remove.

      Returns XmlNodeInterface[]

      A copy of the original array with the remaining elements.

      -
    • Returns a string representation of an array.

      -

      Returns string

    • Inserts new elements at the start of an array, and returns the new length of the array.

      +
    • Returns a string representation of an array.

      +

      Returns string

    • Inserts new elements at the start of an array, and returns the new length of the array.

      Parameters

      Returns number

    • Returns an iterable of values in the array

      -

      Returns ArrayIterator<XmlNodeInterface>

    • Copies an array, then overwrites the value at the provided index with the +

    Returns number

    • Returns an iterable of values in the array

      +

      Returns ArrayIterator<XmlNodeInterface>

    • Copies an array, then overwrites the value at the provided index with the given value. If the index is negative, then it replaces from the end of the array.

      Parameters

      • index: number

        The index of the value to overwrite. If the index is negative, then it replaces from the end of the array.

      • value: XmlNodeInterface

        The value to write into the copied array.

      Returns XmlNodeInterface[]

      The copied array with the updated value.

      -
    • Creates an array from an array-like object.

      +
    • Creates an array from an array-like object.

      Type Parameters

      • T

      Parameters

      • arrayLike: ArrayLike<T>

        An array-like object to convert to an array.

        -

      Returns T[]

    • Creates an array from an iterable object.

      +

    Returns T[]

  • Creates an array from an iterable object.

    Type Parameters

    • T
    • U

    Parameters

    • arrayLike: ArrayLike<T>

      An array-like object to convert to an array.

    • mapfn: ((v: T, k: number) => U)

      A mapping function to call on every element of the array.

        • (v, k): U
        • Parameters

          • v: T
          • k: number

          Returns U

    • OptionalthisArg: any

      Value of 'this' used to invoke the mapfn.

      -

    Returns U[]

  • Creates an array from an iterable object.

    +
  • Returns U[]

  • Creates an array from an iterable object.

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T, any, any> | ArrayLike<T>

      An iterable object to convert to an array.

      -

    Returns T[]

  • Creates an array from an iterable object.

    +
  • Returns T[]

  • Creates an array from an iterable object.

    Type Parameters

    • T
    • U

    Parameters

    • iterable: Iterable<T, any, any> | ArrayLike<T>

      An iterable object to convert to an array.

    • mapfn: ((v: T, k: number) => U)

      A mapping function to call on every element of the array.

        • (v, k): U
        • Parameters

          • v: T
          • k: number

          Returns U

    • OptionalthisArg: any

      Value of 'this' used to invoke the mapfn.

      -

    Returns U[]

    • Creates an array from an async iterator or iterable object.

      +

    Returns U[]

    • Creates an array from an async iterator or iterable object.

      Type Parameters

      • T

      Parameters

      • iterableOrArrayLike: AsyncIterable<T, any, any> | Iterable<T | PromiseLike<T>, any, any> | ArrayLike<T | PromiseLike<T>>

        An async iterator or array-like object to convert to an array.

        -

      Returns Promise<T[]>

    • Creates an array from an async iterator or iterable object.

      +

    Returns Promise<T[]>

  • Creates an array from an async iterator or iterable object.

    Type Parameters

    • T
    • U

    Parameters

    • iterableOrArrayLike: AsyncIterable<T, any, any> | Iterable<T, any, any> | ArrayLike<T>

      An async iterator or array-like object to convert to an array.

    • mapFn: ((value: Awaited<T>) => U)
        • (value): U
        • Parameters

          • value: Awaited<T>

          Returns U

    • OptionalthisArg: any

      Value of 'this' used when executing mapfn.

      -

    Returns Promise<Awaited<U>[]>

    • Parameters

      • arg: any

      Returns arg is any[]

    • Returns a new array from a set of elements.

      +

    Returns Promise<Awaited<U>[]>

    • Parameters

      • arg: any

      Returns arg is any[]

    • Returns a new array from a set of elements.

      Type Parameters

      • T

      Parameters

      • Rest...items: T[]

        A set of elements to include in the new array object.

        -

      Returns T[]

    Constructors

    constructor +

    Constructors

    Methods

    Function getDomImplementation

    FunctiongetDomImplementation

    • Parameters

      • nodo: unknown

      Returns nodo is Node & {
          nodeType: number;
      }

    • Parameters

      • nodo: unknown

      Returns nodo is Node & {
          nodeType: number;
      }

    A DOM element's attribute as an object. In most DOM methods, you will probably directly +

    A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types.

    MDN Reference

    -
    • Parameters

      • val: unknown

      Returns val is Attr

    Methods

    Methods

    • Parameters

      • val: unknown

      Returns val is Attr

    • Parameters

      • val: unknown

      Returns val is Document

    Methods

    Methods

    • Parameters

      • val: unknown

      Returns val is Document

    • Parameters

      • val: unknown

      Returns val is Document

    Methods

    Methods

    • Parameters

      • val: unknown

      Returns val is Document

    Element is the most general base class from which all objects in a Document inherit. It only +

    Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.

    MDN Reference

    -
    • Parameters

      • val: unknown

      Returns val is Element

    Methods

    Methods

    • Parameters

      • val: unknown

      Returns val is Element

    • Parameters

      • val: unknown

      Returns val is Node

    Properties

    ATTRIBUTE_NODE +
    • Parameters

      • val: unknown

      Returns val is Node

    Properties

    ATTRIBUTE_NODE
    CDATA_SECTION_NODE

    node is a CDATASection node.

    -
    COMMENT_NODE

    node is a Comment node.

    -
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    -
    DOCUMENT_NODE

    node is a document.

    -
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    -
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    -
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    -
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    -
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    -
    DOCUMENT_TYPE_NODE

    node is a doctype.

    -
    ELEMENT_NODE

    node is an element.

    -
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    NOTATION_NODE
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    -
    TEXT_NODE

    node is a Text node.

    -

    Methods

    • Parameters

      • val: unknown

      Returns val is Node

    The textual content of Element or Attr. If an element has no markup within its content, it has +

    The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.

    MDN Reference

    -
    • Parameters

      • val: unknown

      Returns val is Text

    Methods

    Methods

    • Parameters

      • val: unknown

      Returns val is Text

    • A method that prevents any further parsing when an error +

      • A method that prevents any further parsing when an error with level error is reported during parsing.

        Returns void | never

        • DOMParserOptions.onError
        • onWarningStopParsing
        -
      • Parameters

        • num: number
        • precision: number

        Returns string

      • Parameters

        • num: number
        • precision: number

        Returns string

      • Parameters

        • num: number
        • precision: number

        Returns number

      • Parameters

        • num: number
        • precision: number

        Returns number

      • Parameters

        • name: string

        Returns boolean

      • Parameters

        • name: string

        Returns boolean

      @nodecfdi/cfdi-core

      Class Hierarchy

      @nodecfdi/cfdi-core

      Class Hierarchy

      @nodecfdi/cfdi-core

      @nodecfdi/cfdi-core

      Source Code +

      @nodecfdi/cfdi-core

      @nodecfdi/cfdi-core

      Source Code Npm Node Version Support Discord Latest Version @@ -182,7 +182,7 @@

      También utilizamos Versionado Semántico 2.0.0 por lo que puedes usar esta librería sin temor a romper tu aplicación.

      Las contribuciones con bienvenidas. Por favor lee CONTRIBUTING para más detalles y recuerda revisar el archivo CHANGELOG.

      The @nodecfdi/cfdi-core library is copyright © NodeCfdi - OcelotlStudio and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

      -

      A DOM element's attribute as an object. In most DOM methods, you will probably directly +

      A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types.

      MDN Reference

      -
      interface Attr {
          ATTRIBUTE_NODE: 2;
          baseURI: "about:blank";
          CDATA_SECTION_NODE: 4;
          childNodes: NodeList<Node>;
          columnNumber?: number;
          COMMENT_NODE: 8;
          DOCUMENT_FRAGMENT_NODE: 11;
          DOCUMENT_NODE: 9;
          DOCUMENT_POSITION_CONTAINED_BY: 16;
          DOCUMENT_POSITION_CONTAINS: 8;
          DOCUMENT_POSITION_DISCONNECTED: 1;
          DOCUMENT_POSITION_FOLLOWING: 4;
          DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
          DOCUMENT_POSITION_PRECEDING: 2;
          DOCUMENT_TYPE_NODE: 10;
          ELEMENT_NODE: 1;
          ENTITY_NODE: 6;
          ENTITY_REFERENCE_NODE: 5;
          firstChild: null | Node;
          isConnected: boolean;
          lastChild: null | Node;
          lineNumber?: number;
          localName: null | string;
          name: string;
          namespaceURI: null | string;
          nextSibling: null | Node;
          nodeName: string;
          nodeType: 2;
          nodeValue: null | string;
          NOTATION_NODE: 12;
          ownerDocument: Document;
          ownerElement: null | Element;
          parentElement: null | Element;
          parentNode: null | Node;
          prefix: null | string;
          previousSibling: null | Node;
          PROCESSING_INSTRUCTION_NODE: 7;
          specified: true;
          TEXT_NODE: 3;
          textContent: null | string;
          value: string;
          appendChild(node: Node): Node;
          cloneNode(deep?: boolean): Node;
          compareDocumentPosition(other: Node): number;
          contains(other: undefined | null | Node): boolean;
          getRootNode(options: GetRootNodeOptions): Node;
          hasChildNodes(): boolean;
          insertBefore(node: Node, child: null | Node): Node;
          isDefaultNamespace(namespace: null | string): boolean;
          isEqualNode(other: Node): boolean;
          isSameNode(other: Node): boolean;
          isSupported(feature: string, version: string): true;
          lookupNamespaceURI(prefix: null | string): null | string;
          lookupPrefix(namespace: null | string): null | string;
          normalize(): void;
          removeChild(child: Node): Node;
          replaceChild(node: Node, child: Node): Node;
      }

      Hierarchy (view full)

      Properties

      interface Attr {
          ATTRIBUTE_NODE: 2;
          baseURI: "about:blank";
          CDATA_SECTION_NODE: 4;
          childNodes: NodeList<Node>;
          columnNumber?: number;
          COMMENT_NODE: 8;
          DOCUMENT_FRAGMENT_NODE: 11;
          DOCUMENT_NODE: 9;
          DOCUMENT_POSITION_CONTAINED_BY: 16;
          DOCUMENT_POSITION_CONTAINS: 8;
          DOCUMENT_POSITION_DISCONNECTED: 1;
          DOCUMENT_POSITION_FOLLOWING: 4;
          DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
          DOCUMENT_POSITION_PRECEDING: 2;
          DOCUMENT_TYPE_NODE: 10;
          ELEMENT_NODE: 1;
          ENTITY_NODE: 6;
          ENTITY_REFERENCE_NODE: 5;
          firstChild: null | Node;
          isConnected: boolean;
          lastChild: null | Node;
          lineNumber?: number;
          localName: null | string;
          name: string;
          namespaceURI: null | string;
          nextSibling: null | Node;
          nodeName: string;
          nodeType: 2;
          nodeValue: null | string;
          NOTATION_NODE: 12;
          ownerDocument: Document;
          ownerElement: null | Element;
          parentElement: null | Element;
          parentNode: null | Node;
          prefix: null | string;
          previousSibling: null | Node;
          PROCESSING_INSTRUCTION_NODE: 7;
          specified: true;
          TEXT_NODE: 3;
          textContent: null | string;
          value: string;
          appendChild(node: Node): Node;
          cloneNode(deep?: boolean): Node;
          compareDocumentPosition(other: Node): number;
          contains(other: undefined | null | Node): boolean;
          getRootNode(options: GetRootNodeOptions): Node;
          hasChildNodes(): boolean;
          insertBefore(node: Node, child: null | Node): Node;
          isDefaultNamespace(namespace: null | string): boolean;
          isEqualNode(other: Node): boolean;
          isSameNode(other: Node): boolean;
          isSupported(feature: string, version: string): true;
          lookupNamespaceURI(prefix: null | string): null | string;
          lookupPrefix(namespace: null | string): null | string;
          normalize(): void;
          removeChild(child: Node): Node;
          replaceChild(node: Node, child: Node): Node;
      }

      Hierarchy (view full)

      Properties

      ATTRIBUTE_NODE
      baseURI

      Always returns about:blank currently.

      +

      Properties

      ATTRIBUTE_NODE
      baseURI

      Always returns about:blank currently.

      MDN Reference

      -
      CDATA_SECTION_NODE

      node is a CDATASection node.

      -
      childNodes: NodeList<Node>

      Returns the children.

      +
      CDATA_SECTION_NODE

      node is a CDATASection node.

      +
      childNodes: NodeList<Node>

      Returns the children.

      MDN Reference

      -
      columnNumber?: number

      One based column position inside the parsed source, +

      columnNumber?: number

      One based column position inside the parsed source, if the locator was not disabled.

      -
      COMMENT_NODE

      node is a Comment node.

      -
      DOCUMENT_FRAGMENT_NODE

      node is a DocumentFragment node.

      -
      DOCUMENT_NODE

      node is a document.

      -
      DOCUMENT_POSITION_CONTAINED_BY

      Set when other is a descendant of node.

      -
      DOCUMENT_POSITION_CONTAINS

      Set when other is an ancestor of node.

      -
      DOCUMENT_POSITION_DISCONNECTED

      Set when node and other are not in the same tree.

      -
      DOCUMENT_POSITION_FOLLOWING

      Set when other is following node.

      -
      DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
      DOCUMENT_POSITION_PRECEDING

      Set when other is preceding node.

      -
      DOCUMENT_TYPE_NODE

      node is a doctype.

      -
      ELEMENT_NODE

      node is an element.

      -
      ENTITY_NODE
      ENTITY_REFERENCE_NODE
      firstChild: null | Node

      Returns the first child.

      +
      COMMENT_NODE

      node is a Comment node.

      +
      DOCUMENT_FRAGMENT_NODE

      node is a DocumentFragment node.

      +
      DOCUMENT_NODE

      node is a document.

      +
      DOCUMENT_POSITION_CONTAINED_BY

      Set when other is a descendant of node.

      +
      DOCUMENT_POSITION_CONTAINS

      Set when other is an ancestor of node.

      +
      DOCUMENT_POSITION_DISCONNECTED

      Set when node and other are not in the same tree.

      +
      DOCUMENT_POSITION_FOLLOWING

      Set when other is following node.

      +
      DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
      DOCUMENT_POSITION_PRECEDING

      Set when other is preceding node.

      +
      DOCUMENT_TYPE_NODE

      node is a doctype.

      +
      ELEMENT_NODE

      node is an element.

      +
      ENTITY_NODE
      ENTITY_REFERENCE_NODE
      firstChild: null | Node

      Returns the first child.

      MDN Reference

      -
      isConnected: boolean

      Returns true if this node is inside of a document or is the document node itself.

      +
      isConnected: boolean

      Returns true if this node is inside of a document or is the document node itself.

      MDN Reference

      -
      lastChild: null | Node

      Returns the last child.

      +
      lastChild: null | Node

      Returns the last child.

      MDN Reference

      -
      lineNumber?: number

      Zero based line position inside the parsed source, +

      lineNumber?: number

      Zero based line position inside the parsed source, if the locator was not disabled.

      -
      localName: null | string

      The local part of the qualified name of this node.

      -
      name: string
      namespaceURI: null | string
      nextSibling: null | Node

      Returns the next sibling.

      +
      localName: null | string

      The local part of the qualified name of this node.

      +
      name: string
      namespaceURI: null | string
      nextSibling: null | Node

      Returns the next sibling.

      MDN Reference

      -
      nodeName: string

      Returns a string appropriate for the type of node.

      +
      nodeName: string

      Returns a string appropriate for the type of node.

      MDN Reference

      -
      nodeType

      Returns the type of node.

      +
      nodeType

      Returns the type of node.

      MDN Reference

      -
      nodeValue: null | string
      NOTATION_NODE
      ownerDocument: Document

      Returns the node document. Returns null for documents.

      +
      nodeValue: null | string
      NOTATION_NODE
      ownerDocument: Document

      Returns the node document. Returns null for documents.

      MDN Reference

      -
      ownerElement: null | Element
      parentElement: null | Element

      Returns the parent Node if it is of type Element, otherwise null.

      +
      ownerElement: null | Element
      parentElement: null | Element

      Returns the parent Node if it is of type Element, otherwise null.

      MDN Reference

      -
      parentNode: null | Node

      Returns the parent.

      +
      parentNode: null | Node

      Returns the parent.

      MDN Reference

      -
      prefix: null | string
      previousSibling: null | Node

      Returns the previous sibling.

      +
      prefix: null | string
      previousSibling: null | Node

      Returns the previous sibling.

      MDN Reference

      -
      PROCESSING_INSTRUCTION_NODE

      node is a ProcessingInstruction node.

      -
      specified

      MDN Reference

      -
      TEXT_NODE

      node is a Text node.

      -
      textContent: null | string
      value: string

      Methods

      • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

        +
      PROCESSING_INSTRUCTION_NODE

      node is a ProcessingInstruction node.

      +
      specified

      MDN Reference

      +
      TEXT_NODE

      node is a Text node.

      +
      textContent: null | string
      value: string

      Methods

      • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

        Parameters

        • Optionaldeep: boolean

        Returns Node

        May throw a DOMException if operations within Element#setAttributeNode or Node#appendChild (which are potentially invoked in this method) do not meet their specific constraints.

        MDN Reference

        -
      • Returns a bitmask indicating the position of other relative to node.

        +
    • Returns a bitmask indicating the position of other relative to node.

      MDN Reference

      -

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      +

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      MDN Reference

      -

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Searches for the root node of this node.

      +

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Returns whether node has children.

      +
    • Returns whether node has children.

      MDN Reference

      -

      Returns boolean

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      +

      Returns boolean

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      +

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      +

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      Parameters

      • feature: string

        The package name of the feature to test. This is the same name that can be passed to the method hasFeature on DOMImplementation.

      • version: string

        This is the version number of the package name to test.

      Returns true

      Since DOMImplementation.hasFeature is deprecated and always returns true.

      Introduced in DOM Level 2

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous +

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

      MDN Reference

      -

      Returns void

    The DOM Node interface is an abstract base class upon which many other DOM API objects are +

    The DOM Node interface is an abstract base class upon which many other DOM API objects are based, thus letting those object types to be used similarly and often interchangeably. As an abstract class, there is no such thing as a plain Node object. All objects that implement Node functionality are based on one of its subclasses. Most notable are Document, Element, @@ -176,7 +176,7 @@

  • http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
  • https://dom.spec.whatwg.org/#node
  • -
    interface Document {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        contentType: MIME_TYPE;
        doctype: null | DocumentType;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        documentElement: null | Element;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        implementation: DOMImplementation;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: "#document";
        nodeType: 9;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        type: "html" | "xml";
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        createAttribute(localName: string): Attr;
        createAttributeNS(namespace: null | string, qualifiedName: string): Attr;
        createCDATASection(data: string): CDATASection;
        createComment(data: string): Comment;
        createDocumentFragment(): DocumentFragment;
        createElement(tagName: string): Element;
        createElementNS(namespace: null | string, qualifiedName: string): Element;
        createEntityReference(name: string): EntityReference;
        createProcessingInstruction(target: string, data: string): ProcessingInstruction;
        createTextNode(data: string): Text;
        getElementById(elementId: string): null | Element;
        getElementsByClassName(classNames: string): LiveNodeList<Element>;
        getElementsByTagName(qualifiedName: string): LiveNodeList<Element>;
        getElementsByTagNameNS(namespaceURI: null | string, localName: string): LiveNodeList<Element>;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        importNode<T>(node: T, deep?: boolean): T;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
    }

    Hierarchy (view full)

    Properties

    interface Document {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        contentType: MIME_TYPE;
        doctype: null | DocumentType;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        documentElement: null | Element;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        implementation: DOMImplementation;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: "#document";
        nodeType: 9;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        type: "html" | "xml";
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        createAttribute(localName: string): Attr;
        createAttributeNS(namespace: null | string, qualifiedName: string): Attr;
        createCDATASection(data: string): CDATASection;
        createComment(data: string): Comment;
        createDocumentFragment(): DocumentFragment;
        createElement(tagName: string): Element;
        createElementNS(namespace: null | string, qualifiedName: string): Element;
        createEntityReference(name: string): EntityReference;
        createProcessingInstruction(target: string, data: string): ProcessingInstruction;
        createTextNode(data: string): Text;
        getElementById(elementId: string): null | Element;
        getElementsByClassName(classNames: string): LiveNodeList<Element>;
        getElementsByTagName(qualifiedName: string): LiveNodeList<Element>;
        getElementsByTagNameNS(namespaceURI: null | string, localName: string): LiveNodeList<Element>;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        importNode<T>(node: T, deep?: boolean): T;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
    }

    Hierarchy (view full)

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    +

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    MDN Reference

    -
    CDATA_SECTION_NODE

    node is a CDATASection node.

    -
    childNodes: NodeList<Node>

    Returns the children.

    +
    CDATA_SECTION_NODE

    node is a CDATASection node.

    +
    childNodes: NodeList<Node>

    Returns the children.

    MDN Reference

    -
    columnNumber?: number

    One based column position inside the parsed source, +

    columnNumber?: number

    One based column position inside the parsed source, if the locator was not disabled.

    -
    COMMENT_NODE

    node is a Comment node.

    -
    contentType: MIME_TYPE

    The mime type of the document is determined at creation time and can not be modified.

    +
    COMMENT_NODE

    node is a Comment node.

    +
    contentType: MIME_TYPE

    The mime type of the document is determined at creation time and can not be modified.

    doctype: null | DocumentType
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    -
    DOCUMENT_NODE

    node is a document.

    -
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    -
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    -
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    -
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    -
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    -
    DOCUMENT_TYPE_NODE

    node is a doctype.

    -
    documentElement: null | Element

    Gets a reference to the root node of the document.

    +
    doctype: null | DocumentType
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    +
    DOCUMENT_NODE

    node is a document.

    +
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    +
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    +
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    +
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    +
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    +
    DOCUMENT_TYPE_NODE

    node is a doctype.

    +
    documentElement: null | Element

    Gets a reference to the root node of the document.

    MDN Reference

    -
    ELEMENT_NODE

    node is an element.

    -
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    +
    ELEMENT_NODE

    node is an element.

    +
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    MDN Reference

    -
    implementation: DOMImplementation

    The implementation that created this document.

    -
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    +
    implementation: DOMImplementation

    The implementation that created this document.

    +
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    MDN Reference

    -
    lastChild: null | Node

    Returns the last child.

    +
    lastChild: null | Node

    Returns the last child.

    MDN Reference

    -
    lineNumber?: number

    Zero based line position inside the parsed source, +

    lineNumber?: number

    Zero based line position inside the parsed source, if the locator was not disabled.

    -
    localName: null | string

    The local part of the qualified name of this node.

    -
    namespaceURI: null | string

    The namespace URI of this node.

    -
    nextSibling: null | Node

    Returns the next sibling.

    +
    localName: null | string

    The local part of the qualified name of this node.

    +
    namespaceURI: null | string

    The namespace URI of this node.

    +
    nextSibling: null | Node

    Returns the next sibling.

    MDN Reference

    -
    nodeName

    Returns a string appropriate for the type of node.

    +
    nodeName

    Returns a string appropriate for the type of node.

    MDN Reference

    -
    nodeType

    Returns the type of node.

    +
    nodeType

    Returns the type of node.

    MDN Reference

    -
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: Document

    Returns the node document. Returns null for documents.

    +
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: Document

    Returns the node document. Returns null for documents.

    MDN Reference

    -
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    +
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    MDN Reference

    -
    parentNode: null | Node

    Returns the parent.

    +
    parentNode: null | Node

    Returns the parent.

    MDN Reference

    -
    prefix: null | string

    The prefix of the namespace for this node.

    -
    previousSibling: null | Node

    Returns the previous sibling.

    +
    prefix: null | string

    The prefix of the namespace for this node.

    +
    previousSibling: null | Node

    Returns the previous sibling.

    MDN Reference

    -
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    -
    TEXT_NODE

    node is a Text node.

    -
    textContent: null | string
    type: "html" | "xml"
      +
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    +
    TEXT_NODE

    node is a Text node.

    +
    textContent: null | string
    type: "html" | "xml"

    Methods

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      +

    Methods

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      Parameters

      • Optionaldeep: boolean

      Returns Node

      May throw a DOMException if operations within Element#setAttributeNode or Node#appendChild (which are potentially invoked in this method) do not meet their specific constraints.

      MDN Reference

      -
    • Returns a bitmask indicating the position of other relative to node.

      +
    • Returns a bitmask indicating the position of other relative to node.

      MDN Reference

      -

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      +

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      MDN Reference

      -

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Creates an attribute object with a specified name.

      +

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Creates an attribute object with a specified name.

      MDN Reference

      -

      Parameters

      • localName: string

      Returns Attr

    • Parameters

      • namespace: null | string
      • qualifiedName: string

      Returns Attr

    • Returns a CDATASection node whose data is data.

      +

      Parameters

      • localName: string

      Returns Attr

    • Parameters

      • namespace: null | string
      • qualifiedName: string

      Returns Attr

    • Returns a CDATASection node whose data is data.

      MDN Reference

      -

      Parameters

      • data: string

      Returns CDATASection

    • Creates a comment object with the specified data.

      +

      Parameters

      • data: string

      Returns CDATASection

    • Creates a comment object with the specified data.

      MDN Reference

      -

      Parameters

      • data: string

      Returns Comment

    • Creates a new document.

      +

      Parameters

      • data: string

      Returns Comment

    • Creates a new document.

      MDN Reference

      -

      Returns DocumentFragment

    • Parameters

      • tagName: string

      Returns Element

    • Returns an element with namespace namespace. Its namespace prefix will be everything before +

      Returns DocumentFragment

    • Parameters

      • tagName: string

      Returns Element

    • Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.

      If localName does not match the Name production an "InvalidCharacterError" DOMException will @@ -340,7 +340,7 @@ namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".

      When supplied, options's is can be used to create a customized built-in element.

      MDN Reference

      -

      Parameters

      • namespace: null | string
      • qualifiedName: string

      Returns Element

    • Creates an EntityReference object. +

      Parameters

      • namespace: null | string
      • qualifiedName: string

      Returns Element

    • Creates an EntityReference object. The current implementation does not fill the childNodes with those of the corresponding Entity

      The name of the entity to reference. No namespace well-formedness checks are performed.

      @@ -348,16 +348,16 @@

      With code INVALID_CHARACTER_ERR when name is not valid.

      with code NOT_SUPPORTED_ERR when the document is of type html

    • Returns a ProcessingInstruction node whose target is target and data is data. If target does +

    • Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.

      MDN Reference

      -

      Parameters

      • target: string
      • data: string

      Returns ProcessingInstruction

    • Creates a text string from the specified value.

      +

      Parameters

      • target: string
      • data: string

      Returns ProcessingInstruction

    • Creates a text string from the specified value.

      Parameters

      • data: string

        String that specifies the nodeValue property of the text node.

        MDN Reference

        -

      Returns Text

    • Returns a reference to the first object with the specified value of the ID attribute.

      -

      Parameters

      • elementId: string

      Returns null | Element

    • Returns a LiveNodeList of all child elements which have all of the given class +

    Returns Text

    • Returns a reference to the first object with the specified value of the ID attribute.

      +

      Parameters

      • elementId: string

      Returns null | Element

    -
    • Returns a LiveNodeList of elements with the given qualifiedName. +

    -
    • Returns a LiveNodeList of elements with the given tag name belonging to the given +

    • Returns a LiveNodeList of elements with the given tag name belonging to the given namespace. The complete document is searched, including the root node.

      The returned list is live, which means it updates itself with the DOM tree automatically. Therefore, there is no need to call Element.getElementsByTagName() with the same element and arguments repeatedly if the DOM changes in between calls.

      MDN Reference

      -

      Parameters

      • namespaceURI: null | string
      • localName: string

      Returns LiveNodeList<Element>

    • Searches for the root node of this node.

      +

      Parameters

      • namespaceURI: null | string
      • localName: string

      Returns LiveNodeList<Element>

    • Returns whether node has children.

      +
    • Returns whether node has children.

      MDN Reference

      -

      Returns boolean

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      +

      Returns boolean

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      If node is a document or a shadow root, throws a "NotSupportedError" DOMException.

      MDN Reference

      -

      Type Parameters

      Parameters

      • node: T
      • Optionaldeep: boolean

      Returns T

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      +

      Type Parameters

      Parameters

      • node: T
      • Optionaldeep: boolean

      Returns T

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      +

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      +

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      Parameters

      • feature: string

        The package name of the feature to test. This is the same name that can be passed to the method hasFeature on DOMImplementation.

      • version: string

        This is the version number of the package name to test.

      Returns true

      Since DOMImplementation.hasFeature is deprecated and always returns true.

      Introduced in DOM Level 2

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous +

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

      MDN Reference

      -

      Returns void

    Element is the most general base class from which all objects in a Document inherit. It only +

    Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.

    MDN Reference

    -
    interface Element {
        ATTRIBUTE_NODE: 2;
        attributes: NamedNodeMap;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: string;
        nodeType: 1;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: null | Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        tagName: string;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        getAttribute(qualifiedName: string): null | string;
        getAttributeNames(): string[];
        getAttributeNode(qualifiedName: string): null | Attr;
        getAttributeNodeNS(namespace: null | string, localName: string): null | Attr;
        getAttributeNS(namespace: null | string, localName: string): null | string;
        getElementsByClassName(classNames: string): LiveNodeList<Element>;
        getElementsByTagName(qualifiedName: string): LiveNodeList<Element>;
        getElementsByTagNameNS(namespaceURI: null | string, localName: string): LiveNodeList<Element>;
        getQualifiedName(): string;
        getRootNode(options: GetRootNodeOptions): Node;
        hasAttribute(qualifiedName: string): boolean;
        hasAttributeNS(namespace: null | string, localName: string): boolean;
        hasAttributes(): boolean;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeAttribute(qualifiedName: string): void;
        removeAttributeNode(attr: Attr): Attr;
        removeAttributeNS(namespace: null | string, localName: string): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
        setAttribute(qualifiedName: string, value: string): void;
        setAttributeNode(attr: Attr): null | Attr;
        setAttributeNodeNS(attr: Attr): null | Attr;
        setAttributeNS(namespace: null | string, qualifiedName: string, value: string): void;
    }

    Hierarchy (view full)

    Properties

    interface Element {
        ATTRIBUTE_NODE: 2;
        attributes: NamedNodeMap;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: string;
        nodeType: 1;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: null | Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        tagName: string;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        getAttribute(qualifiedName: string): null | string;
        getAttributeNames(): string[];
        getAttributeNode(qualifiedName: string): null | Attr;
        getAttributeNodeNS(namespace: null | string, localName: string): null | Attr;
        getAttributeNS(namespace: null | string, localName: string): null | string;
        getElementsByClassName(classNames: string): LiveNodeList<Element>;
        getElementsByTagName(qualifiedName: string): LiveNodeList<Element>;
        getElementsByTagNameNS(namespaceURI: null | string, localName: string): LiveNodeList<Element>;
        getQualifiedName(): string;
        getRootNode(options: GetRootNodeOptions): Node;
        hasAttribute(qualifiedName: string): boolean;
        hasAttributeNS(namespace: null | string, localName: string): boolean;
        hasAttributes(): boolean;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeAttribute(qualifiedName: string): void;
        removeAttributeNode(attr: Attr): Attr;
        removeAttributeNS(namespace: null | string, localName: string): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
        setAttribute(qualifiedName: string, value: string): void;
        setAttributeNode(attr: Attr): null | Attr;
        setAttributeNodeNS(attr: Attr): null | Attr;
        setAttributeNS(namespace: null | string, qualifiedName: string, value: string): void;
    }

    Hierarchy (view full)

    Properties

    ATTRIBUTE_NODE
    attributes: NamedNodeMap
    baseURI

    Always returns about:blank currently.

    +

    Properties

    ATTRIBUTE_NODE
    attributes: NamedNodeMap
    baseURI

    Always returns about:blank currently.

    MDN Reference

    -
    CDATA_SECTION_NODE

    node is a CDATASection node.

    -
    childNodes: NodeList<Node>

    Returns the children.

    +
    CDATA_SECTION_NODE

    node is a CDATASection node.

    +
    childNodes: NodeList<Node>

    Returns the children.

    MDN Reference

    -
    columnNumber?: number

    One based column position inside the parsed source, +

    columnNumber?: number

    One based column position inside the parsed source, if the locator was not disabled.

    -
    COMMENT_NODE

    node is a Comment node.

    -
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    -
    DOCUMENT_NODE

    node is a document.

    -
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    -
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    -
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    -
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    -
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    -
    DOCUMENT_TYPE_NODE

    node is a doctype.

    -
    ELEMENT_NODE

    node is an element.

    -
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    +
    COMMENT_NODE

    node is a Comment node.

    +
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    +
    DOCUMENT_NODE

    node is a document.

    +
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    +
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    +
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    +
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    +
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    +
    DOCUMENT_TYPE_NODE

    node is a doctype.

    +
    ELEMENT_NODE

    node is an element.

    +
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    MDN Reference

    -
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    +
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    MDN Reference

    -
    lastChild: null | Node

    Returns the last child.

    +
    lastChild: null | Node

    Returns the last child.

    MDN Reference

    -
    lineNumber?: number

    Zero based line position inside the parsed source, +

    lineNumber?: number

    Zero based line position inside the parsed source, if the locator was not disabled.

    -
    localName: null | string

    The local part of the qualified name of this node.

    -
    namespaceURI: null | string

    The namespace URI of this node.

    -
    nextSibling: null | Node

    Returns the next sibling.

    +
    localName: null | string

    The local part of the qualified name of this node.

    +
    namespaceURI: null | string

    The namespace URI of this node.

    +
    nextSibling: null | Node

    Returns the next sibling.

    MDN Reference

    -
    nodeName: string

    Returns a string appropriate for the type of node.

    +
    nodeName: string

    Returns a string appropriate for the type of node.

    MDN Reference

    -
    nodeType

    Returns the type of node.

    +
    nodeType

    Returns the type of node.

    MDN Reference

    -
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: null | Document

    Returns the node document. Returns null for documents.

    +
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: null | Document

    Returns the node document. Returns null for documents.

    MDN Reference

    -
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    +
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    MDN Reference

    -
    parentNode: null | Node

    Returns the parent.

    +
    parentNode: null | Node

    Returns the parent.

    MDN Reference

    -
    prefix: null | string

    The prefix of the namespace for this node.

    -
    previousSibling: null | Node

    Returns the previous sibling.

    +
    prefix: null | string

    The prefix of the namespace for this node.

    +
    previousSibling: null | Node

    Returns the previous sibling.

    MDN Reference

    -
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    -
    tagName: string

    Returns the HTML-uppercased qualified name.

    +
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    +
    tagName: string

    Returns the HTML-uppercased qualified name.

    MDN Reference

    -
    TEXT_NODE

    node is a Text node.

    -
    textContent: null | string

    Methods

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      +
    TEXT_NODE

    node is a Text node.

    +
    textContent: null | string

    Methods

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      Parameters

      • Optionaldeep: boolean

      Returns Node

      May throw a DOMException if operations within Element#setAttributeNode or Node#appendChild (which are potentially invoked in this method) do not meet their specific constraints.

      MDN Reference

      -
    • Returns a bitmask indicating the position of other relative to node.

      +
    • Returns a bitmask indicating the position of other relative to node.

      MDN Reference

      -

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      +

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      MDN Reference

      -

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Returns element's first attribute whose qualified name is qualifiedName, and null if there +

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.

      MDN Reference

      -

      Parameters

      • qualifiedName: string

      Returns null | string

    • Returns the qualified names of all element's attributes. Can contain duplicates.

      +

      Parameters

      • qualifiedName: string

      Returns null | string

    • Returns the qualified names of all element's attributes. Can contain duplicates.

      MDN Reference

      -

      Returns string[]

    • Parameters

      • qualifiedName: string

      Returns null | Attr

    • Parameters

      • namespace: null | string
      • localName: string

      Returns null | Attr

    • Returns element's attribute whose namespace is namespace and local name is localName, and +

      Returns string[]

    • Parameters

      • qualifiedName: string

      Returns null | Attr

    • Parameters

      • namespace: null | string
      • localName: string

      Returns null | Attr

    • Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.

      MDN Reference

      -

      Parameters

      • namespace: null | string
      • localName: string

      Returns null | string

    • Returns a LiveNodeList of all child elements which have all of the given class +

      Parameters

      • namespace: null | string
      • localName: string

      Returns null | string

    -
    • Returns a LiveNodeList of elements with the given qualifiedName. +

    -
    • Returns a LiveNodeList of elements with the given tag name belonging to the given +

    • Returns a LiveNodeList of elements with the given tag name belonging to the given namespace. It is similar to Document.getElementsByTagNameNS, except that its search is restricted to descendants of the specified element.

      MDN Reference

      -

      Parameters

      • namespaceURI: null | string
      • localName: string

      Returns LiveNodeList<Element>

    • Returns string

    • Searches for the root node of this node.

      +

      Parameters

      • namespaceURI: null | string
      • localName: string

      Returns LiveNodeList<Element>

    • Returns string

    • Returns true if element has an attribute whose qualified name is qualifiedName, and false +

    • Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.

      MDN Reference

      -

      Parameters

      • qualifiedName: string

      Returns boolean

    • Returns true if element has an attribute whose namespace is namespace and local name is +

      Parameters

      • qualifiedName: string

      Returns boolean

    • Returns true if element has an attribute whose namespace is namespace and local name is localName.

      MDN Reference

      -

      Parameters

      • namespace: null | string
      • localName: string

      Returns boolean

    • Returns true if element has attributes, and false otherwise.

      +

      Parameters

      • namespace: null | string
      • localName: string

      Returns boolean

    • Returns true if element has attributes, and false otherwise.

      MDN Reference

      -

      Returns boolean

    • Returns whether node has children.

      +

      Returns boolean

    • Returns whether node has children.

      MDN Reference

      -

      Returns boolean

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      +

      Returns boolean

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      +

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      +

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      Parameters

      • feature: string

        The package name of the feature to test. This is the same name that can be passed to the method hasFeature on DOMImplementation.

      • version: string

        This is the version number of the package name to test.

      Returns true

      Since DOMImplementation.hasFeature is deprecated and always returns true.

      Introduced in DOM Level 2

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous +

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

      MDN Reference

      -

      Returns void

    • Removes element's first attribute whose qualified name is qualifiedName.

      +

      Returns void

    • Removes element's first attribute whose qualified name is qualifiedName.

      MDN Reference

      -

      Parameters

      • qualifiedName: string

      Returns void

    • Parameters

      Returns Attr

    • Removes element's attribute whose namespace is namespace and local name is localName.

      +

      Parameters

      • qualifiedName: string

      Returns void

    • Parameters

      Returns Attr

    • Removes element's attribute whose namespace is namespace and local name is localName.

      MDN Reference

      -

      Parameters

      • namespace: null | string
      • localName: string

      Returns void

    • Sets the value of element's first attribute whose qualified name is qualifiedName to value.

      +

      Parameters

      • namespace: null | string
      • localName: string

      Returns void

    • Sets the value of element's first attribute whose qualified name is qualifiedName to value.

      MDN Reference

      -

      Parameters

      • qualifiedName: string
      • value: string

      Returns void

    • Parameters

      Returns null | Attr

    • Parameters

      Returns null | Attr

    • Sets the value of element's attribute whose namespace is namespace and local name is +

      Parameters

      • qualifiedName: string
      • value: string

      Returns void

    • Parameters

      Returns null | Attr

    • Parameters

      Returns null | Attr

    • Sets the value of element's attribute whose namespace is namespace and local name is localName to value.

      MDN Reference

      -

      Parameters

      • namespace: null | string
      • qualifiedName: string
      • value: string

      Returns void

    The DOM Node interface is an abstract base class upon which many other DOM API objects are +

    The DOM Node interface is an abstract base class upon which many other DOM API objects are based, thus letting those object types to be used similarly and often interchangeably. As an abstract class, there is no such thing as a plain Node object. All objects that implement Node functionality are based on one of its subclasses. Most notable are Document, Element, @@ -176,7 +176,7 @@

  • http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
  • https://dom.spec.whatwg.org/#node
  • -
    interface Node {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: string;
        nodeType: number;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: null | Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
    }

    Hierarchy (view full)

    Properties

    interface Node {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: string;
        nodeType: number;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: null | Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
    }

    Hierarchy (view full)

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    +

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    MDN Reference

    -
    CDATA_SECTION_NODE

    node is a CDATASection node.

    -
    childNodes: NodeList<Node>

    Returns the children.

    +
    CDATA_SECTION_NODE

    node is a CDATASection node.

    +
    childNodes: NodeList<Node>

    Returns the children.

    MDN Reference

    -
    columnNumber?: number

    One based column position inside the parsed source, +

    columnNumber?: number

    One based column position inside the parsed source, if the locator was not disabled.

    -
    COMMENT_NODE

    node is a Comment node.

    -
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    -
    DOCUMENT_NODE

    node is a document.

    -
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    -
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    -
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    -
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    -
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    -
    DOCUMENT_TYPE_NODE

    node is a doctype.

    -
    ELEMENT_NODE

    node is an element.

    -
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    +
    COMMENT_NODE

    node is a Comment node.

    +
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    +
    DOCUMENT_NODE

    node is a document.

    +
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    +
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    +
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    +
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    +
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    +
    DOCUMENT_TYPE_NODE

    node is a doctype.

    +
    ELEMENT_NODE

    node is an element.

    +
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    MDN Reference

    -
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    +
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    MDN Reference

    -
    lastChild: null | Node

    Returns the last child.

    +
    lastChild: null | Node

    Returns the last child.

    MDN Reference

    -
    lineNumber?: number

    Zero based line position inside the parsed source, +

    lineNumber?: number

    Zero based line position inside the parsed source, if the locator was not disabled.

    -
    localName: null | string

    The local part of the qualified name of this node.

    -
    namespaceURI: null | string

    The namespace URI of this node.

    -
    nextSibling: null | Node

    Returns the next sibling.

    +
    localName: null | string

    The local part of the qualified name of this node.

    +
    namespaceURI: null | string

    The namespace URI of this node.

    +
    nextSibling: null | Node

    Returns the next sibling.

    MDN Reference

    -
    nodeName: string

    Returns a string appropriate for the type of node.

    +
    nodeName: string

    Returns a string appropriate for the type of node.

    MDN Reference

    -
    nodeType: number

    Returns the type of node.

    +
    nodeType: number

    Returns the type of node.

    MDN Reference

    -
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: null | Document

    Returns the node document. Returns null for documents.

    +
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: null | Document

    Returns the node document. Returns null for documents.

    MDN Reference

    -
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    +
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    MDN Reference

    -
    parentNode: null | Node

    Returns the parent.

    +
    parentNode: null | Node

    Returns the parent.

    MDN Reference

    -
    prefix: null | string

    The prefix of the namespace for this node.

    -
    previousSibling: null | Node

    Returns the previous sibling.

    +
    prefix: null | string

    The prefix of the namespace for this node.

    +
    previousSibling: null | Node

    Returns the previous sibling.

    MDN Reference

    -
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    -
    TEXT_NODE

    node is a Text node.

    -
    textContent: null | string

    Methods

    • Parameters

      Returns Node

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      +
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    +
    TEXT_NODE

    node is a Text node.

    +
    textContent: null | string

    Methods

    • Parameters

      Returns Node

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      Parameters

      • Optionaldeep: boolean

      Returns Node

      May throw a DOMException if operations within Element#setAttributeNode or Node#appendChild (which are potentially invoked in this method) do not meet their specific constraints.

      MDN Reference

      -
    • Returns a bitmask indicating the position of other relative to node.

      +
    • Returns a bitmask indicating the position of other relative to node.

      MDN Reference

      -

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      +

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      MDN Reference

      -

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Searches for the root node of this node.

      +

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Returns whether node has children.

      +
    • Returns whether node has children.

      MDN Reference

      -

      Returns boolean

    • Parameters

      Returns Node

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      +

      Returns boolean

    • Parameters

      Returns Node

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      +

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      +

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      Parameters

      • feature: string

        The package name of the feature to test. This is the same name that can be passed to the method hasFeature on DOMImplementation.

      • version: string

        This is the version number of the package name to test.

      Returns true

      Since DOMImplementation.hasFeature is deprecated and always returns true.

      Introduced in DOM Level 2

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous +

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

      MDN Reference

      -

      Returns void

    • Parameters

      Returns Node

    • Parameters

      Returns Node

    The textual content of Element or Attr. If an element has no markup within its content, it has +

    The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.

    MDN Reference

    -
    interface Text {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        data: string;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        length: number;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: "#text" | "#cdata-section";
        nodeType: 3 | 4;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        appendData(data: string): void;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        deleteData(offset: number, count: number): void;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        insertData(offset: number, data: string): void;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
        replaceData(offset: number, count: number, data: string): void;
        splitText(offset: number): Text;
        substringData(offset: number, count: number): string;
    }

    Hierarchy

    • CharacterData
      • Text

    Properties

    interface Text {
        ATTRIBUTE_NODE: 2;
        baseURI: "about:blank";
        CDATA_SECTION_NODE: 4;
        childNodes: NodeList<Node>;
        columnNumber?: number;
        COMMENT_NODE: 8;
        data: string;
        DOCUMENT_FRAGMENT_NODE: 11;
        DOCUMENT_NODE: 9;
        DOCUMENT_POSITION_CONTAINED_BY: 16;
        DOCUMENT_POSITION_CONTAINS: 8;
        DOCUMENT_POSITION_DISCONNECTED: 1;
        DOCUMENT_POSITION_FOLLOWING: 4;
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
        DOCUMENT_POSITION_PRECEDING: 2;
        DOCUMENT_TYPE_NODE: 10;
        ELEMENT_NODE: 1;
        ENTITY_NODE: 6;
        ENTITY_REFERENCE_NODE: 5;
        firstChild: null | Node;
        isConnected: boolean;
        lastChild: null | Node;
        length: number;
        lineNumber?: number;
        localName: null | string;
        namespaceURI: null | string;
        nextSibling: null | Node;
        nodeName: "#text" | "#cdata-section";
        nodeType: 3 | 4;
        nodeValue: null | string;
        NOTATION_NODE: 12;
        ownerDocument: Document;
        parentElement: null | Element;
        parentNode: null | Node;
        prefix: null | string;
        previousSibling: null | Node;
        PROCESSING_INSTRUCTION_NODE: 7;
        TEXT_NODE: 3;
        textContent: null | string;
        appendChild(node: Node): Node;
        appendData(data: string): void;
        cloneNode(deep?: boolean): Node;
        compareDocumentPosition(other: Node): number;
        contains(other: undefined | null | Node): boolean;
        deleteData(offset: number, count: number): void;
        getRootNode(options: GetRootNodeOptions): Node;
        hasChildNodes(): boolean;
        insertBefore(node: Node, child: null | Node): Node;
        insertData(offset: number, data: string): void;
        isDefaultNamespace(namespace: null | string): boolean;
        isEqualNode(other: Node): boolean;
        isSameNode(other: Node): boolean;
        isSupported(feature: string, version: string): true;
        lookupNamespaceURI(prefix: null | string): null | string;
        lookupPrefix(namespace: null | string): null | string;
        normalize(): void;
        removeChild(child: Node): Node;
        replaceChild(node: Node, child: Node): Node;
        replaceData(offset: number, count: number, data: string): void;
        splitText(offset: number): Text;
        substringData(offset: number, count: number): string;
    }

    Hierarchy

    • CharacterData
      • Text

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    +

    Properties

    ATTRIBUTE_NODE
    baseURI

    Always returns about:blank currently.

    MDN Reference

    -
    CDATA_SECTION_NODE

    node is a CDATASection node.

    -
    childNodes: NodeList<Node>

    Returns the children.

    +
    CDATA_SECTION_NODE

    node is a CDATASection node.

    +
    childNodes: NodeList<Node>

    Returns the children.

    MDN Reference

    -
    columnNumber?: number

    One based column position inside the parsed source, +

    columnNumber?: number

    One based column position inside the parsed source, if the locator was not disabled.

    -
    COMMENT_NODE

    node is a Comment node.

    -
    data: string
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    -
    DOCUMENT_NODE

    node is a document.

    -
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    -
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    -
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    -
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    -
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    -
    DOCUMENT_TYPE_NODE

    node is a doctype.

    -
    ELEMENT_NODE

    node is an element.

    -
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    +
    COMMENT_NODE

    node is a Comment node.

    +
    data: string
    DOCUMENT_FRAGMENT_NODE

    node is a DocumentFragment node.

    +
    DOCUMENT_NODE

    node is a document.

    +
    DOCUMENT_POSITION_CONTAINED_BY

    Set when other is a descendant of node.

    +
    DOCUMENT_POSITION_CONTAINS

    Set when other is an ancestor of node.

    +
    DOCUMENT_POSITION_DISCONNECTED

    Set when node and other are not in the same tree.

    +
    DOCUMENT_POSITION_FOLLOWING

    Set when other is following node.

    +
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
    DOCUMENT_POSITION_PRECEDING

    Set when other is preceding node.

    +
    DOCUMENT_TYPE_NODE

    node is a doctype.

    +
    ELEMENT_NODE

    node is an element.

    +
    ENTITY_NODE
    ENTITY_REFERENCE_NODE
    firstChild: null | Node

    Returns the first child.

    MDN Reference

    -
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    +
    isConnected: boolean

    Returns true if this node is inside of a document or is the document node itself.

    MDN Reference

    -
    lastChild: null | Node

    Returns the last child.

    +
    lastChild: null | Node

    Returns the last child.

    MDN Reference

    -
    length: number
    lineNumber?: number

    Zero based line position inside the parsed source, +

    length: number
    lineNumber?: number

    Zero based line position inside the parsed source, if the locator was not disabled.

    -
    localName: null | string

    The local part of the qualified name of this node.

    -
    namespaceURI: null | string

    The namespace URI of this node.

    -
    nextSibling: null | Node

    Returns the next sibling.

    +
    localName: null | string

    The local part of the qualified name of this node.

    +
    namespaceURI: null | string

    The namespace URI of this node.

    +
    nextSibling: null | Node

    Returns the next sibling.

    MDN Reference

    -
    nodeName: "#text" | "#cdata-section"

    Returns a string appropriate for the type of node.

    +
    nodeName: "#text" | "#cdata-section"

    Returns a string appropriate for the type of node.

    MDN Reference

    -
    nodeType: 3 | 4

    Returns the type of node.

    +
    nodeType: 3 | 4

    Returns the type of node.

    MDN Reference

    -
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: Document

    Returns the node document. Returns null for documents.

    +
    nodeValue: null | string
    NOTATION_NODE
    ownerDocument: Document

    Returns the node document. Returns null for documents.

    MDN Reference

    -
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    +
    parentElement: null | Element

    Returns the parent Node if it is of type Element, otherwise null.

    MDN Reference

    -
    parentNode: null | Node

    Returns the parent.

    +
    parentNode: null | Node

    Returns the parent.

    MDN Reference

    -
    prefix: null | string

    The prefix of the namespace for this node.

    -
    previousSibling: null | Node

    Returns the previous sibling.

    +
    prefix: null | string

    The prefix of the namespace for this node.

    +
    previousSibling: null | Node

    Returns the previous sibling.

    MDN Reference

    -
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    -
    TEXT_NODE

    node is a Text node.

    -
    textContent: null | string

    Methods

    • Parameters

      Returns Node

    • Parameters

      • data: string

      Returns void

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      +
    PROCESSING_INSTRUCTION_NODE

    node is a ProcessingInstruction node.

    +
    TEXT_NODE

    node is a Text node.

    +
    textContent: null | string

    Methods

    • Parameters

      Returns Node

    • Parameters

      • data: string

      Returns void

    • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

      Parameters

      • Optionaldeep: boolean

      Returns Node

      May throw a DOMException if operations within Element#setAttributeNode or Node#appendChild (which are potentially invoked in this method) do not meet their specific constraints.

      MDN Reference

      -
    • Returns a bitmask indicating the position of other relative to node.

      +
    • Returns a bitmask indicating the position of other relative to node.

      MDN Reference

      -

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      +

      Parameters

      Returns number

    • Checks whether other is an inclusive descendant of this node.

      MDN Reference

      -

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Parameters

      • offset: number
      • count: number

      Returns void

    • Searches for the root node of this node.

      +

      Parameters

      • other: undefined | null | Node

      Returns boolean

    • Parameters

      • offset: number
      • count: number

      Returns void

    • Returns whether node has children.

      +
    • Returns whether node has children.

      MDN Reference

      -

      Returns boolean

    • Parameters

      Returns Node

    • Parameters

      • offset: number
      • data: string

      Returns void

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      +

      Returns boolean

    • Parameters

      Returns Node

    • Parameters

      • offset: number
      • data: string

      Returns void

    • Parameters

      • namespace: null | string

      Returns boolean

    • Checks whether the given node is equal to this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      +

      Parameters

      Returns boolean

    • Checks whether the given node is this node.

      MDN Reference

      -

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      +

      Parameters

      Returns boolean

    • Checks whether the DOM implementation implements a specific feature and its version.

      Parameters

      • feature: string

        The package name of the feature to test. This is the same name that can be passed to the method hasFeature on DOMImplementation.

      • version: string

        This is the version number of the package name to test.

      Returns true

      Since DOMImplementation.hasFeature is deprecated and always returns true.

      Introduced in DOM Level 2

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous +

    • Parameters

      • prefix: null | string

      Returns null | string

    • Parameters

      • namespace: null | string

      Returns null | string

    • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

      MDN Reference

      -

      Returns void

    • Parameters

      Returns Node

    • Parameters

      Returns Node

    • Parameters

      • offset: number
      • count: number
      • data: string

      Returns void

    • Splits data at the given offset and returns the remainder as Text node.

      +

      Returns void

    • Parameters

      Returns Node

    • Parameters

      Returns Node

    • Parameters

      • offset: number
      • count: number
      • data: string

      Returns void

    • Splits data at the given offset and returns the remainder as Text node.

      MDN Reference

      -

      Parameters

      • offset: number

      Returns Text

    • Parameters

      • offset: number
      • count: number

      Returns string

    interface XmlNodeInterface {
        length: number;
        [iterator](): IterableIterator<XmlNodeInterface, any, any>;
        addAttributes(attributes: Record<string, unknown>): void;
        addChild(node: XmlNodeInterface): XmlNodeInterface;
        attributes(): default;
        children(): default;
        clear(): void;
        getAttribute(name: string): string;
        hasAttribute(name: string): boolean;
        name(): string;
        searchAttribute(...searchPath: string[]): string;
        searchNode(...searchPath: string[]): undefined | XmlNodeInterface;
        searchNodes(...searchPath: string[]): default;
        setAttribute(name: string, value?: null | string): void;
        setValue(value: string): void;
        value(): string;
    }

    Implemented by

    Properties

    length +
    interface XmlNodeInterface {
        length: number;
        [iterator](): IterableIterator<XmlNodeInterface, any, any>;
        addAttributes(attributes: Record<string, unknown>): void;
        addChild(node: XmlNodeInterface): XmlNodeInterface;
        attributes(): default;
        children(): default;
        clear(): void;
        getAttribute(name: string): string;
        hasAttribute(name: string): boolean;
        name(): string;
        searchAttribute(...searchPath: string[]): string;
        searchNode(...searchPath: string[]): undefined | XmlNodeInterface;
        searchNodes(...searchPath: string[]): default;
        setAttribute(name: string, value?: null | string): void;
        setValue(value: string): void;
        value(): string;
    }

    Implemented by

    Properties

    Methods

    Properties

    length: number

    Methods

    • Parameters

      • attributes: Record<string, unknown>

      Returns void

    • Parameters

      • name: string

      Returns string

    • Parameters

      • name: string

      Returns boolean

    • Parameters

      • Rest...searchPath: string[]

      Returns string

    • Parameters

      • name: string
      • Optionalvalue: null | string

      Returns void

    • Parameters

      • value: string

      Returns void

    diff --git a/docs/modules/dom.html b/docs/modules/dom.html index fb1d315..88806d2 100644 --- a/docs/modules/dom.html +++ b/docs/modules/dom.html @@ -156,7 +156,7 @@ --md-sys-color-surface-container-high: #eae8e0; --md-sys-color-surface-container-highest: #e4e3db } -

    Index

    Functions

    getDomImplementation +

    References

    createDomElement +

    References

    Re-exports createDomElement
    Re-exports createElement
    Re-exports documentElement
    Re-exports formatNumber
    Re-exports getDomImplementation
    Re-exports getParser
    Re-exports getSerializer
    Re-exports isAttribute
    Re-exports isDocument
    Re-exports isElement
    Re-exports isNode
    Re-exports isText
    Re-exports isValidXmlName
    Re-exports newDocument
    Re-exports newDocumentContent
    Re-exports nodeFromXmlElement
    Re-exports nodeFromXmlString
    Re-exports nodeToXmlElement
    Re-exports nodeToXmlString
    Re-exports ownerDocument
    Re-exports roundNumber
    Re-exports toFloat
    Renames and re-exports default
    Renames and re-exports default
    Renames and re-exports default
    Renames and re-exports default
    Renames and re-exports default
    Renames and re-exports default

    Index

    Interfaces

    Index

    Interfaces

    Index

    Functions

    formatNumber +

    Index

    Functions

    createDomElement +

    Module xml_nodes/xml_attributes

    Index

    Classes

    Modulexml_nodes/xml_attributes

    Index

    Classes

    Module xml_nodes/xml_node

    Index

    Classes

    Modulexml_nodes/xml_node

    Index

    Classes

    Module xml_nodes/xml_node_utils

    Index

    Functions

    nodeFromXmlElement +

    Module xml_nodes/xml_nodes

    Index

    Classes

    Modulexml_nodes/xml_nodes

    Index

    Classes

    Module xml_nodes/xml_nodes_sorter

    Index

    Classes

    Modulexml_nodes/xml_nodes_sorter

    Index

    Classes

    MIME_TYPE: typeof MIME_TYPE[keyof typeof MIME_TYPE]

    All mime types that are allowed as input to DOMParser.parseFromString

    +
    MIME_TYPE: typeof MIME_TYPE[keyof typeof MIME_TYPE]

    All mime types that are allowed as input to DOMParser.parseFromString

    NAMESPACE: typeof NAMESPACE[keyof typeof NAMESPACE]

    Namespaces that are used in xmldom.

    +
    NAMESPACE: typeof NAMESPACE[keyof typeof NAMESPACE]

    Namespaces that are used in xmldom.

    MIME_TYPE: {
        HTML: "text/html";
        XML_APPLICATION: "application/xml";
        XML_SVG_IMAGE: "image/svg+xml";
        XML_TEXT: "text/xml";
        XML_XHTML_APPLICATION: "application/xhtml+xml";
    }

    All mime types that are allowed as input to DOMParser.parseFromString

    +
    MIME_TYPE: {
        HTML: "text/html";
        XML_APPLICATION: "application/xml";
        XML_SVG_IMAGE: "image/svg+xml";
        XML_TEXT: "text/xml";
        XML_XHTML_APPLICATION: "application/xhtml+xml";
    }

    All mime types that are allowed as input to DOMParser.parseFromString

    Type declaration

    • ReadonlyHTML: "text/html"

      text/html, the only mime type that triggers treating an XML document as HTML.

      -
    NAMESPACE: {
        HTML: "http://www.w3.org/1999/xhtml";
        SVG: "http://www.w3.org/2000/svg";
        XML: "http://www.w3.org/XML/1998/namespace";
        XMLNS: "http://www.w3.org/2000/xmlns/";
    }

    Namespaces that are used in xmldom.

    +
    NAMESPACE: {
        HTML: "http://www.w3.org/1999/xhtml";
        SVG: "http://www.w3.org/2000/svg";
        XML: "http://www.w3.org/XML/1998/namespace";
        XMLNS: "http://www.w3.org/2000/xmlns/";
    }

    Namespaces that are used in xmldom.

    Type declaration

    • ReadonlyHTML: "http://www.w3.org/1999/xhtml"

      The XHTML namespace.

    • ReadonlySVG: "http://www.w3.org/2000/svg"

      The SVG namespace.

      @@ -166,7 +166,7 @@
  • ReadonlyXMLNS: "http://www.w3.org/2000/xmlns/"

    The xmlns: namespace.