Index: frog/gen.dart |
=================================================================== |
--- frog/gen.dart (revision 1427) |
+++ frog/gen.dart (working copy) |
@@ -324,8 +324,15 @@ |
writer.enterBlock('Object.defineProperty(' + |
'${property.declaringType.jsname}.prototype, "${property.jsname}", {'); |
if (property.getter != null) { |
- writer.writeln( |
- 'get: ${property.declaringType.jsname}.prototype.${property.getter.jsname},'); |
+ writer.write( |
+ 'get: ${property.declaringType.jsname}.prototype.${property.getter.jsname}'); |
+ String endOfLine = ''; |
+ // The shenanigan below is to make IE happy -- IE 9 doesn't like a |
+ // trailing comma on the last element in a list. |
+ if (property.setter != null) { |
+ endOfLine = ','; |
+ } |
+ writer.writeln(endOfLine); |
Siggi Cherem (dart-lang)
2011/11/10 23:04:37
(nit): for this short logic, I prefer doing this i
|
} |
if (property.setter != null) { |
writer.writeln( |