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

Unified Diff: client/html/src/shared_FactoryProviders.dart

Issue 9662010: Don't put private members in dart:html interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 years, 9 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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/src/_Testing.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/shared_FactoryProviders.dart
diff --git a/client/html/src/shared_FactoryProviders.dart b/client/html/src/shared_FactoryProviders.dart
index b12c663a2e1045cfcb32f86eeba85a1f5826e29e..b9fb9f5efc8ff10d1c9a3527b848b3a9e3abe2cc 100644
--- a/client/html/src/shared_FactoryProviders.dart
+++ b/client/html/src/shared_FactoryProviders.dart
@@ -4,13 +4,13 @@
class _TextFactoryProvider {
- factory Text(String data) => document._createTextNode(data);
+ factory Text(String data) => _document._createTextNode(data);
}
class _EventFactoryProvider {
factory Event(String type, [bool canBubble = true,
bool cancelable = true]) {
- _EventImpl e = document._createEvent("Event");
+ final _EventImpl e = _document._createEvent("Event");
e._initEvent(type, canBubble, cancelable);
return e;
}
@@ -22,7 +22,7 @@ class _MouseEventFactoryProvider {
[bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
bool altKey = false, bool shiftKey = false, bool metaKey = false,
EventTarget relatedTarget = null]) {
- final e = document._createEvent("MouseEvent");
+ final e = _document._createEvent("MouseEvent");
e._initMouseEvent(type, canBubble, cancelable, view, detail,
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
button, relatedTarget);
@@ -75,8 +75,7 @@ class _ElementFactoryProvider {
parentTag = _CUSTOM_PARENT_TAG_MAP[tag];
}
}
- // TODO(jacobr): make type dom.HTMLElement when dartium allows it.
- _ElementImpl temp = document._createElement(parentTag);
+ final _ElementImpl temp = new Element.tag(parentTag);
temp.innerHTML = html;
Element element;
@@ -96,7 +95,5 @@ class _ElementFactoryProvider {
}
/** @domName Document.createElement */
- factory Element.tag(String tag) {
- return document._createElement(tag);
- }
+ factory Element.tag(String tag) => _document._createElement(tag);
}
« no previous file with comments | « client/html/src/_Testing.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698