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

Unified Diff: sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate

Issue 11647044: Adding annotation for partial browser support and example implementation for MutationObservers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added experimental annotation to MutationObserver. Created 8 years 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 | « sdk/lib/html/templates/html/dartium/html_dartium.darttemplate ('k') | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate b/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
index dda5aeebbf810fd9a8cc147a17e7e093c91d4686..e989a5e0e9314e49c46baad8710f2873c6a34e43 100644
--- a/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate
@@ -5,8 +5,25 @@
part of html;
/// @domName $DOMNAME
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental()
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
+ /**
+ * Checks to see if the mutation observer API is supported on the current
+ * platform.
+ */
+ static bool get supported {
+$if DARTIUM
+ return true;
+$else
+ return JS('bool',
+ '!!(window.MutationObserver || window.WebKitMutationObserver)');
+$endif
+ }
+
void observe(Node target,
{Map options,
bool childList,
« no previous file with comments | « sdk/lib/html/templates/html/dartium/html_dartium.darttemplate ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698