| 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 ce96ec89471f1d2c5963e2543a03dc1d0a03baa1..a32d903be8c722ce9131dbc2b12d0a5134a24ffa 100644
|
| --- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
|
| @@ -76,10 +76,18 @@ $endif
|
| }
|
|
|
| static String _camelCase(String hyphenated) {
|
| +$if DART2JS
|
| + var replacedMs = JS('String', r'#.replace(/^-ms-/, "ms-")', hyphenated);
|
| +
|
| + var fToUpper = const JS_CONST(
|
| + r'function(_, letter) { return letter.toUpperCase(); }');
|
| + return JS('String', r'#.replace(/-([\da-z])/ig, #)', replacedMs, fToUpper);
|
| +$else
|
| // The "ms" prefix is always lowercased.
|
| return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped(
|
| new RegExp('-([a-z]+)', caseSensitive: false),
|
| (match) => match[0][1].toUpperCase() + match[0].substring(2));
|
| +$endif
|
| }
|
|
|
| $if DART2JS
|
|
|