Chromium Code Reviews| Index: lib/html/src/dart2js_MutationObserverSupported.dart |
| diff --git a/pkg/intl/example/basic/basic_example_runner.dart b/lib/html/src/dart2js_MutationObserverSupported.dart |
| similarity index 50% |
| copy from pkg/intl/example/basic/basic_example_runner.dart |
| copy to lib/html/src/dart2js_MutationObserverSupported.dart |
| index 004a5b286dc54401697cc3e6b92ac627594399e7..df239384f2e9ea81332215a6daf033eaefa55184 100644 |
| --- a/pkg/intl/example/basic/basic_example_runner.dart |
| +++ b/lib/html/src/dart2js_MutationObserverSupported.dart |
| @@ -3,12 +3,9 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| /** |
| - * This is just a shell that runs the code in basic_example.dart, leaving |
| - * that as a library that can also be run by tests. |
| + * Checks to see if the mutation observer API is supported on the current |
| + * platform. |
| */ |
| - |
| -#import('basic_example.dart'); |
| - |
| -main() { |
| - setup(runProgram, print); |
| -} |
| +static bool _isMutationObserverSupported() native ''' |
|
vsm
2012/09/21 15:12:40
We should think of a better and user-accessible pa
blois
2012/09/21 17:00:03
Agree- generalizing a mechanism for checking wheth
|
| + return !!( window.MutationObserver || window.WebKitMutationObserver); |
| +'''; |