MCPcopy Index your code
hub / github.com/ampproject/amphtml / attrsByKey

Method attrsByKey

validator/js/engine/htmlparser-interface.js:277–285  ·  view source on GitHub ↗

* Returns an object mapping attribute name to attribute value. This is * populated lazily, as it's not used for most tags. * @return {Object } *

()

Source from the content-addressed store, hash-verified

275 * @return {Object<string, string>}
276 * */
277 attrsByKey() {
278 if (this.attrsByKey_ === null) {
279 this.attrsByKey_ = Object.create(null);
280 for (const attr of this.attrs()) {
281 this.attrsByKey_[attr.name] = attr.value;
282 }
283 }
284 return /** @type{Object<string, string>} */ (this.attrsByKey_);
285 }
286 /**
287 * Returns a duplicate attribute name if the tag contains two attributes
288 * named the same, but with different attribute values. Same attribute name

Callers 1

getAttrValueOrNull_Method · 0.80

Calls 2

attrsMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected