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 7cd522c372404a6faee30022be59761176f70e86..cb5e7dd2037f7cc3338f5fb6a261635e2a1e43df 100644 |
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate |
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate |
@@ -399,8 +399,9 @@ wrap_jso(jsObject) { |
// TODO(alanknight): With upgraded custom elements this causes a failure because |
// we need a new wrapper after the type changes. We could possibly invalidate this |
// if the constructor name didn't match? |
- if (jsObject.dartWrapper != null) { |
- return jsObject.dartWrapper; |
+ var wrapper = js.getDartHtmlWrapperFor(jsObject); |
+ if (wrapper != null) { |
+ return wrapper; |
} |
// Try the most general type conversions on it. |
@@ -429,7 +430,7 @@ wrap_jso(jsObject) { |
if (func != null) { |
dartClass_instance = func(); |
dartClass_instance.blink_jsObject = jsObject; |
- jsObject.dartWrapper = dartClass_instance; |
+ js.setDartHtmlWrapperFor(jsObject, dartClass_instance); |
} |
} |
return dartClass_instance; |