Descriptiondart2js: Forbid # placeholders in JS function bodies.
This enforces one of the guidelines that is described in the documentation for 'JS' in js_runtime/lib/foreign_helper.dart
The JS code should be rewritten to explicitly capture the values in JS.
// Dart 'a' might change after it is closed over.
JS('', 'function(){return #;}', a);
-->
// Immediately bind Dart 'a' to JS 'a' and then close over JS 'a':
//
JS('', '(function(a){return function(){return a;};})(#)', a);
R=sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/77483ae5d34ed0c90355718f515d744f545c0181
Patch Set 1 : #
Total comments: 2
Patch Set 2 : #
Messages
Total messages: 12 (7 generated)
|