* Returns an object mapping attribute name to attribute value. This is * populated lazily, as it's not used for most tags. * @return {Object } *
()
| 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 |
no test coverage detected