OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Javascript preamble, that lets the output of dart2js run on V8's d8 shell. | 5 // Javascript preamble, that lets the output of dart2js run on V8's d8 shell. |
6 | 6 |
7 // Node wraps files and provides them with a different `this`. The global | 7 // Node wraps files and provides them with a different `this`. The global |
8 // `this` can be accessed through `global`. | 8 // `this` can be accessed through `global`. |
9 | 9 |
10 var self = this; | 10 var self = this; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 var action = function() { main(args); } | 274 var action = function() { main(args); } |
275 eventLoop(action); | 275 eventLoop(action); |
276 }; | 276 }; |
277 self.setTimeout = addTimer; | 277 self.setTimeout = addTimer; |
278 self.clearTimeout = cancelTimer; | 278 self.clearTimeout = cancelTimer; |
279 self.setInterval = addInterval; | 279 self.setInterval = addInterval; |
280 self.clearInterval = cancelTimer; | 280 self.clearInterval = cancelTimer; |
281 self.scheduleImmediate = addTask; | 281 self.scheduleImmediate = addTask; |
282 self.self = self; | 282 self.self = self; |
283 })(self); | 283 })(self); |
OLD | NEW |