MCPcopy Create free account
hub / github.com/angular/angular / getAttributeMap

Function getAttributeMap

packages/private/testing/src/browser_utils.ts:34–42  ·  view source on GitHub ↗
(element: any)

Source from the content-addressed store, hash-verified

32}
33
34function getAttributeMap(element: any): Map<string, string> {
35 const res = new Map<string, string>();
36 const elAttrs = element.attributes;
37 for (let i = 0; i < elAttrs.length; i++) {
38 const attrib = elAttrs.item(i);
39 res.set(attrib.name, attrib.value);
40 }
41 return res;
42}
43
44const _selfClosingTags = ['br', 'hr', 'input'];
45export function stringifyElement(el: Element): string {

Callers 1

stringifyElementFunction · 0.85

Calls 1

setMethod · 0.65

Tested by

no test coverage detected