MCPcopy Create free account
hub / github.com/developit/undom / previousSibling

Method previousSibling

src/undom.js:42–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 if (p) return p.childNodes[findWhere(p.childNodes, this, true) + 1];
41 }
42 get previousSibling() {
43 let p = this.parentNode;
44 if (p) return p.childNodes[findWhere(p.childNodes, this, true) - 1];
45 }
46 get firstChild() {
47 return this.childNodes[0];
48 }

Callers

nothing calls this directly

Calls 1

findWhereFunction · 0.90

Tested by

no test coverage detected