MCPcopy Create free account
hub / github.com/ampproject/amphtml / contains

Function contains

test/unit/test-fixed-layer.js:291–300  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

289 return Node.DOCUMENT_POSITION_PRECEDING;
290 },
291 contains(elem) {
292 let el = elem;
293 while (el) {
294 if (el === this) {
295 return true;
296 }
297 el = el.parentElement;
298 }
299 return false;
300 },
301 hasAttribute(name) {
302 for (let i = 0; i < this.attributes.length; i++) {
303 if (this.attributes[i].name === name) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected