Index: tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
index 42ad4508420ae38b99b7b98f44c59ad06890197f..86c34093a9077b676620bcd1806e1d91ac5fc451 100644 |
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate |
@@ -111,5 +111,14 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
throw new UnsupportedError("Cannot invoke click SVG."); |
} |
+ /** |
+ * Checks to see if the SVG element type is supported by the current platform. |
+ * |
+ * The tag should be a valid SVG element tag name. |
+ */ |
+ static bool isTagSupported(String tag) { |
+ var e = new $CLASSNAME.tag(tag); |
+ return e is $CLASSNAME && !(e is UnknownElement); |
+ } |
$!MEMBERS |
} |