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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

Issue 1583773003: Support JS$ prefix for dart and fix bug where _operator_getter and the [] operator were used incons… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: remove tests to put with matching dart2js tests Created 4 years, 11 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
Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index c82e9b509aed4c60e5785f07ecc9ffcbe88729b1..66a18e0cf9d62595ba2858b43c6d61f05f0c4c7d 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -158,9 +158,9 @@ final htmlBlinkMap = {
'_DOMWindowCrossFrame': () => _DOMWindowCrossFrame,
// FIXME: Move these to better locations.
'DateTime': () => DateTime,
- 'JsObject': () => js.JsObjectImpl,
- 'JsFunction': () => js.JsFunctionImpl,
- 'JsArray': () => js.JsArrayImpl,
+ 'JsObject': () => js.JsObject,
+ 'JsFunction': () => js.JsFunction,
+ 'JsArray': () => js.JsArray,
$!TYPE_MAP
};
@@ -373,7 +373,7 @@ String _getCustomElementName(element) {
} else if (runtimeType == TemplateElement) {
// Data binding with a Dart class.
tag = element.attributes['is'];
- } else if (runtimeType == js.JsObjectImpl) {
+ } else if (runtimeType == js.JsObject) {
// It's a Polymer core element (written in JS).
// Make sure it's an element anything else we can ignore.
if (element.hasProperty('nodeType') && element['nodeType'] == 1) {
@@ -386,7 +386,7 @@ String _getCustomElementName(element) {
}
}
} else {
- throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObjectImpl.');
+ throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, expected HtmlElement/HtmlTemplate/JsObject.');
}
return tag;
@@ -394,15 +394,9 @@ String _getCustomElementName(element) {
/// An abstract class for all DOM objects we wrap in dart:html and related
/// libraries.
-///
-/// ** Internal Use Only **
@Deprecated("Internal Use Only")
-class DartHtmlDomObject {
-
- /// The underlying JS DOM object.
- @Deprecated("Internal Use Only")
- js.JsObject blink_jsObject;
-
+class DartHtmlDomObject extends js.JSObject {
+ DartHtmlDomObject() : super.internal();
}
@Deprecated("Internal Use Only")
@@ -418,24 +412,6 @@ debug_or_assert(message, expression) {
}
}
-// TODO(terry): Manage JS interop JsFunctions for each listener used for add/
-// removeEventListener. These JsFunctions will leak look at
-// fixing with weak-refs in C++. The key are the hashcodes of the
-// user's this (this is needed for futures) and listener function.
-Map<int, Map<int, js.JsFunction>> _knownListeners = {};
-
-@Deprecated("Internal Use Only")
-js.JsFunction wrap_event_listener(theObject, Function listener) {
- var thisHashCode = theObject.hashCode;
- var listenerHashCode = identityHashCode(listener);
-
- _knownListeners.putIfAbsent(thisHashCode, () => new Map<int, js.JsFunction>());
- _knownListeners[thisHashCode].putIfAbsent(listenerHashCode, () =>
- new js.JsFunction.withThis((theObject, event) => listener(wrap_jso(event))));
-
- return _knownListeners[thisHashCode][listenerHashCode];
-}
-
@Deprecated("Internal Use Only")
Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) {
var result = new Map();
« no previous file with comments | « tools/dom/src/dartium_CustomElementSupport.dart ('k') | tools/dom/templates/html/impl/impl_DOMException.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698