aslakhellesoy / env-js forked from jeresig/env-js

A pure-JavaScript browser environment.

This URL has Read+Write access

karnowski (author)
Tue Feb 17 17:50:32 -0800 2009
commit  3ef4e6b7cf6dc497a4809039a2923d6738a0bc9b
tree    e2eb6f3e447bd9226206f1734a4aefbe6068eb74
parent  c28d462cabbbb0e8878b7fdc4f4655261c86b133
env-js / README
100644 64 lines (47 sloc) 1.932 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
env.js : A pure JavaScript browser environment.
Developed by John Resig (http://ejohn.org)
 
Major Contributers:
Chris Thatcher (http://github.com/thatcher)
 
GitHub repositories:
http://github.com/jeresig/env-js/
http://github.com/thatcher/env-js/
 
Mailing List:
http://groups.google.com/group/envjs
 
Lighthouse (Bug Tracking):
http://envjs.lighthouseapp.com/projects/21590-envjs/
 
Original blog post:
http://ejohn.org/projects/bringing-the-browser-to-the-server/
 
Rhino (Java-based JavaScript engine)
http://www.mozilla.org/rhino/
 
 
Building:
* run "ant concat"
* Creates a platform-agnostic "dist/env.js" file and a Rhino-specific "dist/env.rhino.js" file.
 
Testing:
* run "ant test"
 
Installing:
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:
    window.location = "some/file.html";
 
3) Optionally trigger "document ready" events in one of these ways:
 
  a) standard window.load method:
    load('env.rhino.js');
    window.onload = function() { /* do something after DOM is loaded */};
    window.location = "some/file.html";
    
  b) jQuery ready method:
    load('env.rhino.js');
    load('jquery-1.2.6.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:
    // load env.js
    // load your framework
    // tell env.js the base DOM to model
    // run any setup code for your framework
    // tell the framework that the document is loaded
    
Testing jQuery Compatibility:
* run ./bin/test-jquery.sh 1.2.6
* run ./bin/test-jquery.sh 1.3.1
* Checks out the given jQuery tag from Subversion into test/vendor/jQuery/[version], moves dist/env.rhino.js into
the correct location in their tree, and runs the test suites.