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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 13744003: Add back localName and improve toString for Html nodes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 6794e8a7c7c7162f1238bea4ecdf215af94900ac..aeaa7a01b6d2bb562e1be3c98fc0655781a2b746 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -9775,12 +9775,6 @@ abstract class Element extends Node implements ElementTraversal {
}
- /**
- * Print out a String representation of this Element. By default, this is
- * this Element's tagName.
- */
- String toString() => this.tagName;
-
Element.internal() : super.internal();
@DomName('Element.abortEvent')
@@ -19499,6 +19493,12 @@ class Node extends EventTarget {
return _modelChangedStream.stream;
}
+ /**
+ * Print out a String representation of this Node.
+ */
+ String toString() => localName == null ?
+ (nodeValue == null ? super.toString() : nodeValue) : localName;
+
Node.internal() : super.internal();
@DomName('Node.childNodes')
@@ -19515,7 +19515,7 @@ class Node extends EventTarget {
@DomName('Node.localName')
@DocsEditable
- String get $dom_localName native "Node_localName_Getter";
+ String get localName native "Node_localName_Getter";
@DomName('Node.namespaceURI')
@DocsEditable
@@ -31319,7 +31319,7 @@ abstract class _AttributeMap implements Map<String, String> {
var keys = new List<String>();
for (int i = 0, len = attributes.length; i < len; i++) {
if (_matches(attributes[i])) {
- keys.add(attributes[i].$dom_localName);
+ keys.add(attributes[i].localName);
}
}
return keys;
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698