Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 12262048: Renaming Element.dataAttributes to Element.dataset. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 71f7cce8748de47a99dc60ce222d900cd504c501..ed06eff9a16b1fd93aa5a965a42486dd68721d51 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -8686,20 +8686,20 @@ abstract class Element extends Node implements ElementTraversal native "*Element
*
* Would be accessed in Dart as:
*
- * var value = element.dataAttributes['myRandomValue'];
+ * var value = element.dataset['myRandomValue'];
*
* See also:
*
* * [Custom data attributes](http://www.w3.org/TR/html5/global-attributes.html#custom-data-attribute)
*/
- Map<String, String> get dataAttributes =>
+ Map<String, String> get dataset =>
new _DataAttributeMap(attributes);
- void set dataAttributes(Map<String, String> value) {
- final dataAttributes = this.dataAttributes;
- dataAttributes.clear();
+ void set dataset(Map<String, String> value) {
+ final data = this.dataset;
+ data.clear();
for (String key in value.keys) {
- dataAttributes[key] = value[key];
+ data[key] = value[key];
}
}
@@ -9261,10 +9261,6 @@ abstract class Element extends Node implements ElementTraversal native "*Element
@DocsEditable
final int clientWidth;
- @DomName('Element.dataset')
- @DocsEditable
- final Map<String, String> dataset;
-
@JSName('firstElementChild')
@DomName('Element.firstElementChild')
@DocsEditable
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('J')

Powered by Google App Engine
This is Rietveld 408576698