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

Method observe

test/unit/test-ini-load.js:106–111  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

104 }
105
106 observe(element) {
107 if (this.elements.includes(element)) {
108 throw new Error('already observed');
109 }
110 this.elements.push(element);
111 }
112
113 unobserve(element) {
114 if (!this.elements.includes(element)) {

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected