-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMStringMap
has no mechanism to add/remove/change values
#127
Comments
I've ran into this, too! CC @srujzs |
I'm surprised we don't emit some properties already: https://github.com/w3c/webref/blob/8d7678e1740d00c3b79ebf70013d0448b23e3c8b/ed/idl/html.idl#L161 It might be due to us not handling That being said, I don't think we can feasibly implement |
This one is a show stopper for me, I can't start the migration from 'dart:html' to 'web' until it gets fixed. |
Can you describe a bit more on what's affecting your migration? If it's the above indexing operators, you can define your own import 'dart:js_interop';
import 'dart:js_interop_unsafe';
extension on DOMStringMap {
external String operator [](String name);
external void operator []=(String name, String value);
void delete(String name) => this.delete(name.toJS);
} Matching the definition here: https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes:domstringmap-3. |
DOMStringMap
, primarily returned byHTMLElement#dataset
does not provide any mechanism to set or access its values.Would be nice if it implemented something like
Map<String, String>
if that was possible :)The text was updated successfully, but these errors were encountered: