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

Side by Side Diff: sdk/lib/html/templates/html/impl/impl_MutationObserver.darttemplate

Issue 11299220: Add @JSName annotation for native fields and methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix _NodeList 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html; 5 part of html;
6 6
7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 $!MEMBERS 8 $!MEMBERS
9 void observe(Node target, 9 void observe(Node target,
10 {Map options, 10 {Map options,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 _observe(target, options); 68 _observe(target, options);
69 } 69 }
70 $endif 70 $endif
71 71
72 $if DART2JS 72 $if DART2JS
73 static _createDict() => JS('var', '{}'); 73 static _createDict() => JS('var', '{}');
74 static _add(m, String key, value) { JS('void', '#[#] = #', m, key, value); } 74 static _add(m, String key, value) { JS('void', '#[#] = #', m, key, value); }
75 static _fixupList(list) => list; // TODO: Ensure is a JavaScript Array. 75 static _fixupList(list) => list; // TODO: Ensure is a JavaScript Array.
76 76
77 // Call native function with no conversions. 77 // Call native function with no conversions.
78 void _call(target, options) native 'observe'; 78 @JSName('observe')
79 void _call(target, options) native;
79 $endif 80 $endif
80 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698