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

Unified Diff: tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate

Issue 12295039: Fixing CssStyleDeclaration to not throw exceptions for unsupported values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« no previous file with comments | « tests/html/cssstyledeclaration_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index 6c732494100a92b36c4a390737b2b962badcc236..040a646c8c9bfdd43e44bcf972af8978363c6858 100644
--- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -53,11 +53,14 @@ $!MEMBERS
$if DART2JS
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 (JS('bool', '!!#.setAttribute', this)) {
- JS('void', '#.setAttribute(#, #)', this, propertyName, value);
- }
+ // try/catch for IE9 which throws on unsupported values.
+ try {
+ JS('void', '#.setProperty(#, #, #)', this, propertyName, value, priority);
+ // Bug #2772, IE9 requires a poke to actually apply the value.
+ if (JS('bool', '!!#.setAttribute', this)) {
+ JS('void', '#.setAttribute(#, #)', this, propertyName, value);
+ }
+ } catch (e) {}
}
/**
« no previous file with comments | « tests/html/cssstyledeclaration_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698