commit | c15549493c5408714c6d9cfef44f82fe8335880b | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Fri Dec 02 14:15:49 2016 -0800 |
committer | Natalie Weizenbaum <nweiz@google.com> | Fri Dec 02 14:15:49 2016 -0800 |
tree | 3b9e373308282bcc48ccc1c337def0fa9e94de5f | |
parent | 48c9f0772ed55fc481ec1f9a4980c4ce8ed71010 [diff] |
Fix global.location. The previous implementation would always fail on Windows. This one only fails in edge-cases involving characters that are invalid in URIs.
A simple package for a better dart2js preamble for running on node.js. This package exists for ease of use if incorporating into your build system.
This preamble is suggested for use over d8.js, and provides many improvements and bug fixes, as it uses node.js's timer functions and event loop over the custom one implemented in d8.js.
The JavaScript file can be found at lib/preamble.js.
You can also get the preamble via Dart, like in the following example.
import "package:node_preamble/preamble.dart" as preamble; main() { print(preamble.getPreamble()); }
Credit goes to the Dart team for creating Dart, dart2js, and the original preamble which this is derived from.