Index: tools/dom/scripts/generator.py |
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py |
index 92a5ed0e98c37a40eeb851c0f296c0f82f14b83c..6d235b816f53147a6f71e835d90876aa976dcb45 100644 |
--- a/tools/dom/scripts/generator.py |
+++ b/tools/dom/scripts/generator.py |
@@ -546,14 +546,10 @@ class OperationInfo(object): |
if (wrap_unwrap_type_blink(type_id, type_registry)): |
type_is_callback = self.isCallback(type_registry, type_id) |
if (dart_js_interop and type_id == 'EventListener' and |
- (self.name == 'addEventListener')): |
+ self.name in ['addEventListener', 'removeEventListener']): |
# Events fired need use a JsFunction not a anonymous closure to |
# insure the event can really be removed. |
- parameters.append('wrap_event_listener(this, %s)' % p.name) |
- elif (dart_js_interop and type_id == 'EventListener' and |
- (self.name == 'removeEventListener')): |
- # Find the JsFunction that corresponds to this Dart function. |
- parameters.append('_knownListeners[this.hashCode][identityHashCode(%s)]' % p.name) |
+ parameters.append('unwrap_jso(js.allowInterop(%s))' % p.name) |
elif dart_js_interop and type_id == 'FontFaceSetForEachCallback': |
# forEach is supported in the DOM for FontFaceSet as it iterates |
# over the Javascript Object the callback parameters are also |