| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index fcfeafc96e23a253ac2faaf08deb0f86d9f2e559..9ceaa5bfb8e4c12321459bca2bf97a6d1cecae88 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -32931,7 +32931,18 @@ void _registerCustomElement(context, document, String tag, Type type,
|
| if (baseClassName == null) {
|
| throw new ArgumentError(type);
|
| }
|
| - if (baseClassName == 'Element') baseClassName = 'HTMLElement';
|
| +
|
| + if (extendsTagName == null) {
|
| + if (baseClassName != 'HTMLElement') {
|
| + throw new UnsupportedError('Class must provide extendsTag if base '
|
| + 'native class is not HTMLElement');
|
| + }
|
| + } else {
|
| + if (!JS('bool', '(#.createElement(#) instanceof window[#])',
|
| + document, extendsTagName, baseClassName)) {
|
| + throw new UnsupportedError('extendsTag does not match base native class');
|
| + }
|
| + }
|
|
|
| var baseConstructor = JS('=Object', '#[#]', context, baseClassName);
|
|
|
|
|