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

Function getAttribute

test/unit/test-fixed-layer.js:309–316  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

307 return false;
308 },
309 getAttribute(name) {
310 for (let i = 0; i < this.attributes.length; i++) {
311 if (this.attributes[i].name === name) {
312 return this.attributes[i].value;
313 }
314 }
315 return null;
316 },
317 setAttribute(name, value) {
318 if (name.includes('[')) {
319 throw new Error('invalid characters');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected