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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/html_common/html_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index fb829f2db7c3b7aac318431b780c09a24f75edff..3745223974e357da362c7b3dce5cceafea01b7c9 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -16249,6 +16249,10 @@ class MutationEvent extends Event {
/// @domName MutationObserver
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental()
class MutationObserver extends NativeFieldWrapperClass1 {
///@docsEditable true
@@ -16267,6 +16271,14 @@ class MutationObserver extends NativeFieldWrapperClass1 {
/** @domName MutationObserver.takeRecords */
List<MutationRecord> takeRecords() native "MutationObserver_takeRecords_Callback";
+ /**
+ * Checks to see if the mutation observer API is supported on the current
+ * platform.
+ */
+ static bool get supported {
+ return true;
+ }
+
void observe(Node target,
{Map options,
bool childList,
@@ -30191,7 +30203,6 @@ class _MeasurementRequest<T> {
typedef void _MeasurementCallback();
-
/**
* This class attempts to invoke a callback as soon as the current event stack
* unwinds, but before the browser repaints.
@@ -30206,7 +30217,7 @@ abstract class _MeasurementScheduler {
* Creates the best possible measurement scheduler for the current platform.
*/
factory _MeasurementScheduler.best(_MeasurementCallback callback) {
- if (_isMutationObserverSupported()) {
+ if (MutationObserver.supported) {
return new _MutationObserverScheduler(callback);
}
return new _PostMessageScheduler(callback);
@@ -30558,18 +30569,6 @@ abstract class _Deserializer {
// BSD-style license that can be found in the LICENSE file.
-/**
- * Checks to see if the mutation observer API is supported on the current
- * platform.
- */
-bool _isMutationObserverSupported() {
- return true;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
// TODO(rnystrom): add a way to supress public classes from DartDoc output.
// TODO(jacobr): we can remove this class now that we are using the $dom_
// convention for deprecated methods rather than truly private methods.
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/html_common/html_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698