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

Unified Diff: lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate

Issue 11094082: Convert legacy 'native code' to JS-forms in dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
Index: lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
diff --git a/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index c4c066dce24ae355b2126aad1e80e6ec1fa30009..0112df0b5017f87df4b6a26207fcbf97705394ec 100644
--- a/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -29,13 +29,13 @@ $!MEMBERS
}
$if DART2JS
- void setProperty(String propertyName, String value, [String priority]) native '''
- this.setProperty(propertyName, value, priority);
+ void setProperty(String propertyName, String value, [String priority]) {
+ JS('void', '#.setProperty(#, #, #)', this, propertyName, value, priority);
// Bug #2772, IE9 requires a poke to actually apply the value.
- if (this.setAttribute) {
- this.setAttribute(propertyName, value);
+ if (JS('bool', '!!#.setAttribute', this)) {
+ JS('void', '#.setAttribute(#, #)', this, propertyName, value);
}
- ''';
+ }
$endif
// TODO(jacobr): generate this list of properties using the existing script.

Powered by Google App Engine
This is Rietveld 408576698