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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b9897d912b33711b7417cc21e92ad6b34576b990..0ea70f59131746860c5fe2266c529e21d7599b37 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9195,12 +9195,6 @@ abstract class Element extends Node implements ElementTraversal native "*Element
throw new UnsupportedError("Not supported on this platform");
}
- /**
- * Print out a String representation of this Element. By default, this is
- * this Element's tagName.
- */
- String toString() => this.tagName;
-
@DomName('Element.abortEvent')
@DocsEditable
@@ -18069,6 +18063,12 @@ class Node extends EventTarget native "*Node" {
return _modelChangedStream.stream;
}
+ /**
+ * Print out a String representation of this Node.
+ */
+ String toString() => localName == null ?
+ (nodeValue == null ? super.toString() : nodeValue) : localName;
+
@JSName('childNodes')
@DomName('Node.childNodes')
@@ -18087,10 +18087,9 @@ class Node extends EventTarget native "*Node" {
@DocsEditable
final Node $dom_lastChild;
- @JSName('localName')
@DomName('Node.localName')
@DocsEditable
- final String $dom_localName;
+ final String localName;
@JSName('namespaceURI')
@DomName('Node.namespaceURI')
@@ -29189,7 +29188,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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698