| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index 580fcb4d1ba26b2b8eb7bb839183413dbaae48da..e7d064e5f6c942597b207de87812cc0b62b7ba2e 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -51,6 +51,7 @@ import 'dart:web_audio' as web_audio;
|
| import 'dart:web_audio' show web_audioBlinkMap;
|
| import 'dart:web_audio' show web_audioBlinkFunctionMap;
|
| import 'dart:_blink' as _blink;
|
| +import 'dart:developer';
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
| @@ -47090,15 +47091,23 @@ class _VMElementUpgrader implements ElementUpgrader {
|
| }
|
|
|
| Element upgrade(element) {
|
| - if (element.runtimeType != js.JsObjectImpl) {
|
| - throw new UnsupportedError('Element is incorrect type');
|
| + var jsObject;
|
| + var tag;
|
| + if (element.runtimeType == HtmlElement) {
|
| + jsObject = unwrap_jso(element);
|
| + tag = element.localName;
|
| + } else if (element.runtimeType == js.JsObjectImpl) {
|
| + // It's a Polymer core element (written in JS).
|
| + jsObject = element;
|
| + tag = element['localName'];
|
| + } else {
|
| + throw new UnsupportedError('Element is incorrect type. Got ${element.runtimeType}, expected HtmlElement/JsObjectImpl.');
|
| }
|
|
|
| // Remember Dart class to tagName for any upgrading done in wrap_jso.
|
| - var tag = element['localName'];
|
| _knownCustomeElements[tag] = _type;
|
|
|
| - return createCustomUpgrader(_nativeType, element);
|
| + return createCustomUpgrader(_nativeType, jsObject);
|
| }
|
| }
|
|
|
|
|