= envjs : pilot fish =
env.js : A pure JavaScript browser environment.
Envjs has moved! Here! We are currently looking for volunteer team members to help make Envjs the project we know it can be. We are also moving out ticket tracking and primary documentation here which we’ll integrate into our main site at our site so we can improve our docs rapidly.
Envjs needs a small group of dedicated volunteers to help keep this project rolling along smoothly. If your interested please just send us a message letting us know the role(s) you’ld like to help with.
Module Managers
Web Designers
Release Manager
Pull Request Manager
Ticket Manager
Email List Manager
Blog Manager
Wiki Manager
We have a lot of work, but Envjs is an increasingly important project with javascripts place as a language growing and growing. We also need lots of people contributing examples, patches, new tests etc.
Sincerely,
Thatcher
Originally Developed by:
John Resig (http://ejohn.org)
Major Contributers:
Christopher Thatcher
Nick Galbreath
Steven Parkes
Early Contributers and Integrated Project Authors:
John Resig (Envjs Prototype and Concept)
Yehuda Katz (Early XHR Implementation)
Jon van Noort (Early DOM Implementation)
David Joham (Early DOM Implementation)
Scott Severtson (Early DOM Implementation)
Steffen Meschkat (XPath Implementation)
Henri Sivonen (HTML5Parser Implementation)
Main GitHub Repository:
http://github.com/envjs/env-js
Historically Significant GitHub repositories:
http://github.com/jeresig/env-js/
http://github.com/thatcher/env-js/
Mailing List:
http://groups.google.com/group/envjs
Original blog post:
http://ejohn.org/projects/bringing-the-browser-to-the-server/
Rhino (Java-based JavaScript engine)
http://www.mozilla.org/rhino/
= Guides and Apis =
http://www.envjs.com/doc/guides
http://www.envjs.com/doc/apis
Getting the code:
== src folder ==
The source files for this project are organized by the conventions described below. All final sources are included here, including the massaged parser. Platform developers are welcome to use the src/env/ folder to consider a new platform.== specs folder ==
The ‘specifications’ are our best attempt at isolating some DOM Spec into something we can measure via an existing implementation, namely Firefox, and which also allow us to pass the same tests in a Platform.== a couple code conventions ==
== contributing tests with patches ==
Each module has a spec in env-js/specs. Most tests will run whether you load them in the file:, http:, or https:, though once you get to xhr.js the tests will fail for the ‘file:’ protocol in firefox because of permissions. To run xhr.js and window.js specs, copy settings.js to local_settings.js, update it, and run a local server to satisfy those urls included in the spec.js;== Platforms ==
= 1.3 =
Out of the box we have support for native platforms with rhino, nodejs,
python-spidermonkey, ruby-v8 (via therubyracer), and ruby-spidermonkey (via
johnson). We hope to support php and perl as well soon.
== 1.2 and lower ==
Out of the box 1.2 and lower will only run on rhino. Some support via ruby
was possible via steven parkes fork of envjs.
== Installing ==
= 1.3 =
0) common usage –
bin/envjs file0.js file1.js file2.js … fileN.js
1) fileX.js should be used to simply set window.location and do whatever
else your browser-javascript-loving-heart desires. For example
Thats its! There are a lot of ways to use Envjs to be productive so enjoy!
= 1.2 and lower =
0) common usage – all you need is env.rhino.js and rhino js.jar
java -jar js.jar -opt -1 myscript.js
1) Include the proper env.js file for your platform.
load(‘env.rhino.js’); //if in a Rhino script
2) Tell env.js to load an HTML file from your file system that it should model:
var someWindow = window.open(“some/file.html”); or window.location = “some/file.html”; Optionally you can turn on/off settings by passing an options object: Envjs({ scriptTypes: { "": true, “text/javascript”: true } });All together, the steps could be:
a) simplest method: load(‘env.rhino.js’); window.location = “some/file.html”; b) jQuery ready method: load(‘env.rhino.js’); load(‘jquery.js’); window.location = “some/file.html”; load(‘some-code-that-sets-up-jquery-onready-behaviors.js’) jQuery.ready(); c) Other JavaScript frameworks have their own methods of setup, but the general pattern is: // step 1: load env.js // optionally: load your framework(s) // step 2: tell env.js the base DOM to model // optionally: run any setup code for your framework // step 3: tell the framework that the document is loadedNote:
The window object can be re-used, for example when crawling
Testing jQuery Compatibility:
== 1.3 change notes ==
== 1.1 to 1.2 note ==
The goal for refactoring 1.1.rcX to 1.2.X was primarily to isolate and organize the code into more independent areas, provide behavior driven testing with tests that run on firefox for each module and it’s dependencies. Java command line in 1.1: env.rhino.js can be run either with a “generic” version of the Rhino library (js.jar), or with the repackaged/extended version of Rhino supplied with env.js (env-js.jar). If your application uses multiple windows, frames, or iframes, or if it depends on precise adherence to JavaScript object scoping in event handlers, you will have to use env-js.jar. Simple applications may be able to run with the generic version of Rhino. The command line used for testing env.js can be found in build.xml, although the general form is: java -jar [jar file] [javascript file] Where “jar file” is either “dist/env-js.jar”, “rhino/js.jar”, or your local path to a different version of the Rhino js.jar file. The “javascript file” is the path to the JavaScript you wish to execute. Changes with new timer code: Previously with envjs, you could call Java’s thread sleep() method to delay execution. This was mostly used in test suites. This may no longer work the same since it will inhibit all events from firing. You can now use the Envjs.wait(milliseconds) call to achieve an effect similar to calling sleep().此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。