Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: tools/dom/templates/html/impl/impl_SVGElement.darttemplate

Issue 12082122: Add supported checks to the SVG library, and library cleanup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698