| Index: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
|
| index 03f4b642a8c365fd6f6fad41b3a9be48b2ab36e4..3f651f2044d146020a1983d503f2caaa8c460abe 100644
|
| --- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
|
| @@ -357,6 +357,16 @@ $else
|
|
|
| // Figure out which DOM class is being extended from the user's Dart class.
|
| var classMirror = reflectClass(customElementClass);
|
| +
|
| + var locationUri = classMirror.location.sourceUri.toString();
|
| + if (locationUri == 'dart:html' || locationUri == 'dart:svg') {
|
| + throw new DomException.jsInterop("HierarchyRequestError: Cannot register an existing dart:html or dart:svg type.");
|
| + }
|
| +
|
| + if (classMirror.isAbstract) {
|
| + throw new DomException.jsInterop("HierarchyRequestError: Cannot register an abstract class.");
|
| + }
|
| +
|
| var jsClassName = _getJSClassName(classMirror);
|
| if (jsClassName == null) {
|
| // Only components derived from HTML* can be extended.
|
|
|