envjs 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README +4 -1
  2. data/lib/envjs/env.js +3815 -133
  3. data/lib/envjs/runtime.rb +3 -3
  4. metadata +2 -2
data/README CHANGED
@@ -24,7 +24,7 @@ js>
24
24
  It's also possible to embed the envjs interpreter similar to the way it's done in Johnson, e.g.,
25
25
 
26
26
  require 'rubygems' # if necessary
27
- require 'johnson/tramonkey'
27
+ require 'johnson/tracemonkey'
28
28
  require 'envjs/runtime'
29
29
 
30
30
  envjs = Johnson::Runtime.new
@@ -32,5 +32,8 @@ envjs.extend Envjs::Runtime
32
32
  window = envjs.evaluate("window")
33
33
  puts window.location.to_s # == "about:blank"
34
34
  puts window.document.innerHTML # == "<html><head><title></title></head><body></body></html>"
35
+ envjs.wait
36
+
37
+ You need the Runtime#wait at the end to give env.js's event loop a chance to execute queued events and timers. You may need to do this at other times as well, depending on the asynchronous nature of your application.
35
38
 
36
39
  Comments to http://groups.google.com/group/envjs or #envjs on freenode.