(element: any)
| 32 | } |
| 33 | |
| 34 | function 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 | |
| 44 | const _selfClosingTags = ['br', 'hr', 'input']; |
| 45 | export function stringifyElement(el: Element): string { |