Index: tools/dom/src/native_DOMImplementation.dart |
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart |
index cbea9eda1b4dc69f198b662d1de38e16057cb770..0cc189c638e1f8749aba307227314124803f02eb 100644 |
--- a/tools/dom/src/native_DOMImplementation.dart |
+++ b/tools/dom/src/native_DOMImplementation.dart |
@@ -412,8 +412,14 @@ class _Utils { |
throw new UnsupportedError("Invalid custom element from $libName."); |
} |
var className = MirrorSystem.getName(cls.simpleName); |
- if (!cls.constructors.containsKey(new Symbol('$className.created'))) { |
- throw new UnsupportedError('Class is missing constructor $className.created'); |
+ var createdConstructor = cls.constructors[new Symbol('$className.created')]; |
+ if (createdConstructor == null) { |
+ throw new UnsupportedError( |
+ 'Class is missing constructor $className.created'); |
+ } |
+ if (createdConstructor.parameters.length > 0) { |
+ throw new UnsupportedError( |
+ 'Constructor $className.created must take zero arguments'); |
} |
_register(document, tag, type, extendsTagName); |
} |