MCPcopy Create free account
hub / github.com/breck7/scroll / domElement

Method domElement

external/.scrollLibs.js:22776–22783  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22774 return this.has("collapse")
22775 }
22776 get domElement() {
22777 var elem = document.createElement(this.getTag())
22778 elem.setAttribute("stumpUid", this._getUid())
22779 this.filter(particle => particle.isAttributeParser).forEach(subparticle => elem.setAttribute(subparticle.cue, subparticle.content))
22780 elem.innerHTML = this.has("bern") ? this.getParticle("bern").subparticlesToString() : this._getOneLiner()
22781 this.filter(particle => particle.isHtmlTagParser).forEach(subparticle => elem.appendChild(subparticle.domElement))
22782 return elem
22783 }
22784 _toHtml(indentCount, withSuid) {
22785 const tag = this.getTag()
22786 const children = this.map(child => child._toHtml(indentCount + 1, withSuid)).join("")

Callers

nothing calls this directly

Calls 8

getTagMethod · 0.95
_getOneLinerMethod · 0.95
_getUidMethod · 0.80
forEachMethod · 0.80
subparticlesToStringMethod · 0.80
filterMethod · 0.45
hasMethod · 0.45
getParticleMethod · 0.45

Tested by

no test coverage detected