On this page:
1.1 Getting Started
1.2 Libraries Provided by this Package
1.3 Java Script Language for Dr Scheme
1.4 Design Choices
1.5 Known Limitations
1.6 Feedback and Bug Reports
1.7 Acknowledgments
1.8 History
Version: 4.1.0.2

1 JavaScript for PLT Scheme

This package is an implementation of the ECMAScript language specified by ECMA-262 Edition 3, better known as JavaScript.

1.1 Getting Started

The easiest way to get started using JavaScript for PLT Scheme is with the main module:

 (require (planet dherman/javascript:6))

This module provides everything in the entire package. Subsequent sections of this manual describe the functionality of the individual libraries included, which can also be required individually.

Examples:

  > (require (planet dherman/javascript:6))

  > (js-eval "print(40 + 2)")

  42

  > (require (planet dherman/pprint:4))

  > (pretty-print

     (format-term

      (parse-source-element

       "while (true) { print('break!'); break }")))

  while ((true)) {

      print("break!");

      break;

  }

1.2 Libraries Provided by this Package

This package includes:

1.3 JavaScript Language for DrScheme

Installing this PLaneT package also automatically registers a DrScheme language called JavaScript, filed under Experimental Languages. Selecting the JavaScript language from DrScheme’s Language menu allows you to create and load JavaScript programs and interact with JavaScript at the REPL.

1.4 Design Choices

1.5 Known Limitations

Some limitations that are likely to be fixed eventually:

Some limitations that are less likely to be fixed any time soon:

1.6 Feedback and Bug Reports

Before sending feedback or bug reports, please consult the current set of registered issues. If you cannot find your issue there, feel free to file a new bug report in the online issue database.

Any other feedback may be emailed to me, Dave Herman, at dherman@ccs.neu.edu.

1.7 Acknowledgments

This package was developed by me, Dave Herman. I thank Michael Greenberg, Dave Gurnell, Leo Meyerovich, and Jay McCarthy for their helpful feedback. I also thank Richard Cobbe, Ryan Culpepper, and Sam Tobin-Hochstadt for helping me with my many technical questions.

1.8 History