TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

NamedNodeMap is indexable by string

Open evmar opened this issue 8 years ago • 1 comments

According to the spec (https://dom.spec.whatwg.org/#interface-namednodemap) and experimentally in Chrome, you can index a NamedNodeMap with a string and get back an Attr.

The TS definition only has:

interface NamedNodeMap {
    // [...]
    [index: number]: Attr;
}

evmar avatar Dec 20 '17 02:12 evmar

This should be closed @saschanaz

Bashamega avatar Apr 03 '25 12:04 Bashamega