You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOMStringMap is defined as an empty interface - this makes it awkward to use #1852
This means it's a compile error to directly access the object properties, but it's also an implicit any error if the --noImplicitAny switch is turned on in the compiler. This makes using a node's dataset somewhat arduous since a cast is required.
I'm not sure if there is some way to declare that an object has arbitrary properties of some given type, but perhaps a minimal working solution would be to give this interface a string indexer:
Activity
danquirk commentedon Jan 29, 2015
Seems like there are a few different methods on this type that aren't currently represented in the .d.ts: https://developer.mozilla.org/en-US/docs/Web/API/DOMStringMap. All of them would still be satisfied with that string indexer signature.
saschanaz commentedon Jan 31, 2015
The methods described in MDN are not implemented in any of three major web browsers including Firefox.
W3C: http://www.w3.org/TR/html5/infrastructure.html#domstringmap
I hope TS allow
node.dataset.xway as written in W3C example...