smparkes-envjs 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. data/bin/envjsrb +157 -73
  2. data/bin/jquery-1.3.2-test.js +11 -4
  3. data/lib/envjs/env.js +935 -11028
  4. data/lib/envjs/net/cgi.rb +94 -0
  5. data/lib/envjs/net/file.rb +4 -4
  6. data/lib/envjs/runtime.rb +80 -24
  7. data/test/call-load-test.js +0 -2
  8. data/test/firebug/errorIcon.png +0 -0
  9. data/test/firebug/firebug.css +209 -0
  10. data/test/firebug/firebug.html +23 -0
  11. data/test/firebug/firebug.js +672 -0
  12. data/test/firebug/firebugx.js +10 -0
  13. data/test/firebug/infoIcon.png +0 -0
  14. data/test/firebug/warningIcon.png +0 -0
  15. data/test/fixtures/html/events.html +171 -0
  16. data/test/fixtures/html/iframe1.html +46 -0
  17. data/test/fixtures/html/iframe1a.html +46 -0
  18. data/test/fixtures/html/iframe2.html +45 -0
  19. data/test/fixtures/html/iframe3.html +28 -0
  20. data/test/fixtures/html/iframeN.html +57 -0
  21. data/test/fixtures/html/malformed.html +181 -0
  22. data/test/fixtures/html/scope.html +81 -0
  23. data/test/fixtures/html/trivial.html +19 -0
  24. data/test/fixtures/html/with_js.html +26 -0
  25. data/test/fixtures/images/icon-blue.png +0 -0
  26. data/test/fixtures/js/external_script.js +1 -0
  27. data/test/fixtures/js/script.js +1 -0
  28. data/test/fixtures/js/script_error.js +2 -0
  29. data/test/html/malformed.html +1 -0
  30. data/test/index.html +21 -19
  31. data/test/{primaryTests.js → primary-tests.js} +1 -3
  32. data/test/{prototype.js → prototype-test.js} +0 -2
  33. data/test/qunit/qunit/qunit.css +0 -0
  34. data/test/qunit/qunit/qunit.js +2 -2
  35. data/test/{qunit/qunit/qunit.js.smp → specs/dist/env.spec.js} +539 -7
  36. data/test/specs/envjs.spec.css +46 -0
  37. data/test/specs/parser/html.js +31 -0
  38. data/test/specs/parser/spec.html +40 -0
  39. data/test/specs/parser/xml.js +31 -0
  40. data/test/specs/qunit.bdd.js +210 -0
  41. data/test/{qunit.smp/qunit → specs}/qunit.css +0 -0
  42. data/test/{qunit.smp/qunit → specs}/qunit.js +2 -2
  43. data/test/specs/template/spec-0.js +31 -0
  44. data/test/specs/template/spec-1.js +31 -0
  45. data/test/specs/template/spec.html +40 -0
  46. data/test/specs/window/css.js +23 -0
  47. data/test/specs/window/dialog.js +25 -0
  48. data/test/specs/window/document.js +23 -0
  49. data/test/specs/window/event.js +25 -0
  50. data/test/specs/window/history.js +34 -0
  51. data/test/specs/window/location.js +34 -0
  52. data/test/specs/window/navigator.js +71 -0
  53. data/test/specs/window/screen.js +42 -0
  54. data/test/specs/window/spec.html +48 -0
  55. data/test/specs/window/timer.js +26 -0
  56. data/test/specs/window/window.js +53 -0
  57. data/test/specs/xhr/spec.html +47 -0
  58. data/test/specs/xhr/xhr.js +31 -0
  59. data/test/test.js +10 -0
  60. data/test/unit/elementmembers.js +31 -0
  61. data/test/unit/nu.validator.js +34 -0
  62. data/test/unit/onload.js +1 -3
  63. data/test/unit/parser.js +106 -98
  64. data/test/unit/prototypecompat.js +2 -2
  65. data/test/vendor/jQuery/1.3.2/ChangeLog.txt +98 -0
  66. data/test/vendor/jQuery/1.3.2/GPL-LICENSE.txt +278 -0
  67. data/test/vendor/jQuery/1.3.2/MIT-LICENSE.txt +20 -0
  68. data/test/vendor/jQuery/1.3.2/Makefile +154 -0
  69. data/test/vendor/jQuery/1.3.2/README +67 -0
  70. data/test/vendor/jQuery/1.3.2/build/ant-contrib-0.6.jar +0 -0
  71. data/test/vendor/jQuery/1.3.2/build/build/min.js +11 -0
  72. data/test/vendor/jQuery/1.3.2/build/build/pack.js +19 -0
  73. data/test/vendor/jQuery/1.3.2/build/js/Packer.js +209 -0
  74. data/test/vendor/jQuery/1.3.2/build/js/ParseMaster.js +106 -0
  75. data/test/vendor/jQuery/1.3.2/build/js/Words.js +62 -0
  76. data/test/vendor/jQuery/1.3.2/build/js/base2.js +978 -0
  77. data/test/vendor/jQuery/1.3.2/build/js/jsmin.js +316 -0
  78. data/test/vendor/jQuery/1.3.2/build/js/json.js +117 -0
  79. data/test/vendor/jQuery/1.3.2/build/js/pack.js +316 -0
  80. data/test/vendor/jQuery/1.3.2/build/js/parse.js +105 -0
  81. data/test/vendor/jQuery/1.3.2/build/js/writeFile.js +19 -0
  82. data/test/vendor/jQuery/1.3.2/build/js/xml.js +25 -0
  83. data/test/vendor/jQuery/1.3.2/build/js.jar +0 -0
  84. data/test/vendor/jQuery/1.3.2/build/runtest/env.js +1 -0
  85. data/test/vendor/jQuery/1.3.2/build/runtest/test.js +106 -0
  86. data/test/vendor/jQuery/1.3.2/build/runtest/testrunner.js +197 -0
  87. data/test/vendor/jQuery/1.3.2/build/speed/benchmarker.css +65 -0
  88. data/test/vendor/jQuery/1.3.2/build/speed/benchmarker.js +181 -0
  89. data/test/vendor/jQuery/1.3.2/build/speed/index.html +72 -0
  90. data/test/vendor/jQuery/1.3.2/build/speed/jquery-basis.js +3549 -0
  91. data/test/vendor/jQuery/1.3.2/build/style.xsl +99 -0
  92. data/test/vendor/jQuery/1.3.2/build/yuicompressor-2.4.2.jar +0 -0
  93. data/test/vendor/jQuery/1.3.2/build.xml +123 -0
  94. data/test/vendor/jQuery/1.3.2/dist/jquery.js +4376 -0
  95. data/test/vendor/jQuery/1.3.2/reminder.txt +3 -0
  96. data/test/vendor/jQuery/1.3.2/src/ajax.js +541 -0
  97. data/test/vendor/jQuery/1.3.2/src/core.js +1255 -0
  98. data/test/vendor/jQuery/1.3.2/src/data.js +145 -0
  99. data/test/vendor/jQuery/1.3.2/src/dimensions.js +49 -0
  100. data/test/vendor/jQuery/1.3.2/src/event.js +684 -0
  101. data/test/vendor/jQuery/1.3.2/src/fx.js +407 -0
  102. data/test/vendor/jQuery/1.3.2/src/intro.js +13 -0
  103. data/test/vendor/jQuery/1.3.2/src/offset.js +155 -0
  104. data/test/vendor/jQuery/1.3.2/src/outro.js +1 -0
  105. data/test/vendor/jQuery/1.3.2/src/selector.js +1015 -0
  106. data/test/vendor/jQuery/1.3.2/src/support.js +112 -0
  107. data/test/vendor/jQuery/1.3.2/test/data/cow.jpg +0 -0
  108. data/test/vendor/jQuery/1.3.2/test/data/dashboard.xml +11 -0
  109. data/test/vendor/jQuery/1.3.2/test/data/echoQuery.php +1 -0
  110. data/test/vendor/jQuery/1.3.2/test/data/iframe.html +8 -0
  111. data/test/vendor/jQuery/1.3.2/test/data/json.php +9 -0
  112. data/test/vendor/jQuery/1.3.2/test/data/json_assigned_obj.js +1 -0
  113. data/test/vendor/jQuery/1.3.2/test/data/json_obj.js +1 -0
  114. data/test/vendor/jQuery/1.3.2/test/data/jsonp.php +10 -0
  115. data/test/vendor/jQuery/1.3.2/test/data/name.html +1 -0
  116. data/test/vendor/jQuery/1.3.2/test/data/name.php +29 -0
  117. data/test/vendor/jQuery/1.3.2/test/data/offset/absolute.html +39 -0
  118. data/test/vendor/jQuery/1.3.2/test/data/offset/body.html +24 -0
  119. data/test/vendor/jQuery/1.3.2/test/data/offset/fixed.html +33 -0
  120. data/test/vendor/jQuery/1.3.2/test/data/offset/relative.html +31 -0
  121. data/test/vendor/jQuery/1.3.2/test/data/offset/scroll.html +39 -0
  122. data/test/vendor/jQuery/1.3.2/test/data/offset/static.html +31 -0
  123. data/test/vendor/jQuery/1.3.2/test/data/offset/table.html +43 -0
  124. data/test/vendor/jQuery/1.3.2/test/data/params_html.php +12 -0
  125. data/test/vendor/jQuery/1.3.2/test/data/test.html +7 -0
  126. data/test/vendor/jQuery/1.3.2/test/data/test.js +3 -0
  127. data/test/vendor/jQuery/1.3.2/test/data/test.php +7 -0
  128. data/test/vendor/jQuery/1.3.2/test/data/test2.html +5 -0
  129. data/test/vendor/jQuery/1.3.2/test/data/test3.html +3 -0
  130. data/test/vendor/jQuery/1.3.2/test/data/testrunner.js +1 -0
  131. data/test/vendor/jQuery/1.3.2/test/data/text.php +12 -0
  132. data/test/vendor/jQuery/1.3.2/test/data/with_fries.xml +25 -0
  133. data/test/vendor/jQuery/1.3.2/test/index.html +229 -0
  134. data/test/vendor/jQuery/1.3.2/test/jqenv-1259090275493.html +247 -0
  135. data/test/vendor/jQuery/1.3.2/test/jqenv-1259091671501.html +247 -0
  136. data/test/vendor/jQuery/1.3.2/test/jqenv-1259175319655.html +247 -0
  137. data/test/vendor/jQuery/1.3.2/test/offset.html +28 -0
  138. data/test/vendor/jQuery/1.3.2/test/otherlibs/jquery/1.2.1/jquery.js +11 -0
  139. data/test/vendor/jQuery/1.3.2/test/otherlibs/jquery/1.2.3/jquery.js +11 -0
  140. data/test/vendor/jQuery/1.3.2/test/otherlibs/mootools/1.11/mootools.js +1577 -0
  141. data/test/vendor/jQuery/1.3.2/test/otherlibs/prototype/1.6.0.2/prototype.js +4221 -0
  142. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/builder.js +131 -0
  143. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/controls.js +835 -0
  144. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/dragdrop.js +944 -0
  145. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/effects.js +1090 -0
  146. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/scriptaculous.js +51 -0
  147. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/slider.js +278 -0
  148. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/unittest.js +564 -0
  149. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/builder.js +136 -0
  150. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/controls.js +965 -0
  151. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/dragdrop.js +974 -0
  152. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/effects.js +1122 -0
  153. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/scriptaculous.js +58 -0
  154. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/slider.js +275 -0
  155. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/sound.js +55 -0
  156. data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/unittest.js +568 -0
  157. data/test/vendor/jQuery/1.3.2/test/polluted.php +64 -0
  158. data/test/vendor/jQuery/1.3.2/test/qunit/testrunner.js +780 -0
  159. data/test/vendor/jQuery/1.3.2/test/qunit/testsuite.css +120 -0
  160. data/test/vendor/jQuery/1.3.2/test/test.js +41 -0
  161. data/test/vendor/jQuery/1.3.2/test/unit/ajax.js +856 -0
  162. data/test/vendor/jQuery/1.3.2/test/unit/core.js +1872 -0
  163. data/test/vendor/jQuery/1.3.2/test/unit/data.js +160 -0
  164. data/test/vendor/jQuery/1.3.2/test/unit/dimensions.js +86 -0
  165. data/test/vendor/jQuery/1.3.2/test/unit/event.js +670 -0
  166. data/test/vendor/jQuery/1.3.2/test/unit/fx.js +451 -0
  167. data/test/vendor/jQuery/1.3.2/test/unit/offset.js +173 -0
  168. data/test/vendor/jQuery/1.3.2/test/unit/selector.js +395 -0
  169. data/test/vendor/jQuery/1.3.2/test/xhtml.php +5 -0
  170. data/test/vendor/jQuery/1.3.2/version.txt +1 -0
  171. metadata +158 -22
  172. data/lib/envjs/runtime.rb.smp +0 -133
  173. data/test/envjs-call-load-test.js +0 -5
  174. data/test/envjs-prototype.js +0 -5
  175. data/test/qunit/package.json +0 -21
  176. data/test/qunit/test/index.html +0 -17
  177. data/test/qunit/test/same.js +0 -1368
  178. data/test/qunit/test/test.js +0 -136
  179. data/test/qunit.smp/package.json +0 -21
  180. data/test/qunit.smp/test/index.html +0 -17
  181. data/test/qunit.smp/test/same.js +0 -1368
  182. data/test/qunit.smp/test/test.js +0 -136
  183. data/test/rhino-call-load-test.js +0 -5
  184. data/test/rhino-prototype.js +0 -5
  185. data/test/test-with-envs-jar.js +0 -8
  186. data/test/test-with-rhino-jar.js +0 -9
@@ -0,0 +1,94 @@
1
+ require 'net/protocol'
2
+
3
+ require 'envjs/net'
4
+
5
+ class Envjs::Net::CGI
6
+
7
+ def save_and_set k, v
8
+ @saved[k] = ENV[k]
9
+ ENV[k] = v
10
+ end
11
+
12
+ def restore
13
+ @saved.keys.each do |k|
14
+ ENV[k] = @saved[k]
15
+ end
16
+ @saved = {}
17
+ end
18
+
19
+ def initialize xhr, data
20
+ if (match = %r((.*\.php)(\?(.*))?).match xhr.url).nil?
21
+ raise "Not CGI"
22
+ end
23
+
24
+ @saved = {}
25
+
26
+ begin
27
+
28
+ # p match[0]
29
+
30
+ path = match[1]
31
+ path.sub! %r(^file://), ""
32
+
33
+ save_and_set( "GATEWAY_INTERFACE", "CGI/1.1" )
34
+
35
+ save_and_set( "REQUEST_METHOD", xhr["method"] )
36
+ if ( match[3] )
37
+ save_and_set( "QUERY_STRING", match[3] )
38
+ end
39
+
40
+ if ct = xhr["headers"]["Content-Type"]
41
+ save_and_set( "CONTENT_TYPE", ct )
42
+ end
43
+
44
+ if data
45
+ save_and_set( "CONTENT_LENGTH", data.length.to_s )
46
+ end
47
+
48
+ xhr["headers"].each do |k,v|
49
+ k.gsub!("-","_")
50
+ k = "HTTP_" + k
51
+ save_and_set( k, v )
52
+ end
53
+
54
+ result = nil
55
+
56
+ save_and_set( "PATH_INFO", path )
57
+ save_and_set( "PATH_TRANSLATED", path )
58
+ save_and_set( "REDIRECT_STATUS", "200" )
59
+
60
+ open("|php-cgi", "r+") do |php|
61
+ if data
62
+ php.write data
63
+ php.flush
64
+ end
65
+ result = php.read
66
+ end
67
+
68
+ result && result = result.split("\r\n")
69
+ @headers = {}
70
+ while line = result.shift
71
+ break if line == ""
72
+ match = /([^:]*):\s*(.*)/.match line
73
+ @headers[match[1]]=match[2]
74
+ end
75
+ # p "q", result.join("\r\n")
76
+ @body = result.join("\r\n")
77
+ ensure
78
+ restore
79
+ end
80
+
81
+ end
82
+
83
+ def each
84
+ @headers.each do |k,v|
85
+ yield k, v
86
+ end
87
+ end
88
+
89
+ def finish
90
+ end
91
+
92
+ attr_reader :body
93
+
94
+ end
@@ -29,6 +29,10 @@ class Envjs::Net::File < Net::Protocol
29
29
  def finish
30
30
  end
31
31
 
32
+ def request request
33
+ Response.new request.path
34
+ end
35
+
32
36
  class Response
33
37
  def initialize path
34
38
  @path = path
@@ -68,8 +72,4 @@ class Envjs::Net::File < Net::Protocol
68
72
 
69
73
  end
70
74
 
71
- def request request
72
- Response.new request.path
73
- end
74
-
75
75
  end
data/lib/envjs/runtime.rb CHANGED
@@ -71,7 +71,7 @@ puts = function() {
71
71
  EOJS
72
72
 
73
73
  master = global["$master"] = evaluate("new Object")
74
- master.symbols = [ "Johnson", "Ruby", "print", "debug", "puts", "load", "whichInterpreter", "multiwindow" ]
74
+ master.symbols = [ "Johnson", "Ruby", "print", "debug", "puts", "load", "reload", "whichInterpreter", "multiwindow" ]
75
75
  master.symbols.each { |symbol| master[symbol] = global[symbol] }
76
76
 
77
77
  master.whichInterpreter = "Johnson"
@@ -85,58 +85,83 @@ EOJS
85
85
  $envjsrb_deps && ( @db ||= FSDB::Database.new $envjsrb_deps )
86
86
  end
87
87
 
88
+ top_level_js = nil
89
+
90
+ add_dep = nil
91
+
88
92
  clear_deps = lambda do |w|
89
93
  begin
90
- if db.call
91
- loc = w
92
- begin loc = w.location; rescue; end
93
- loc && ( loc = loc.to_s )
94
- if ( loc !~ %r((http?s|file|about):) )
95
- loc = "file://" + Pathname(loc).realpath.to_s
96
- end
97
- # $stderr.puts "clear", loc
98
- if loc and loc != "about:blank"
99
- paths = db.call[loc+".on.yml"] || []
100
- paths.each do |path|
101
- # $stderr.print "#{path} not by #{loc}\n";
102
- db.call[path+".by.yml"].delete loc
94
+ if db.call
95
+ loc = w
96
+ begin loc = w.location; rescue; end
97
+ loc && ( loc = loc.to_s )
98
+ if ( loc !~ %r((http?s|file|about):) )
99
+ begin
100
+ loc = "file://" + Pathname(loc).realpath.to_s
101
+ rescue Errno::ENOENT; end
102
+ end
103
+ # $stderr.puts "clear", loc
104
+ if loc and loc != "about:blank"
105
+ paths = db.call[loc+".on.yml"] || []
106
+ paths.each do |path|
107
+ # $stderr.print "#{path} not by #{loc}\n";
108
+ db.call[path+".by.yml"].delete loc
109
+ end
110
+ # $stderr.print "#{loc} not on anything\n";
111
+ db.call.delete loc+".on.yml"
103
112
  end
104
- # $stderr.print "#{loc} not on anything\n";
105
- db.call.delete loc+".on.yml"
106
113
  end
107
- end
108
- rescue Exception => e; $stderr.puts e; end
114
+ add_dep.call( nil, loc )
115
+ rescue Exception => e; $stderr.puts e, e.class; $stderr.puts e.backtrace; end
109
116
  end
110
117
 
111
118
  if $envjsrb_deps
112
119
  Envjs::Net::File.on_open = clear_deps
113
120
  end
114
-
121
+
115
122
  add_dep = lambda do |w, f|
116
123
  if db.call
117
124
  loc = nil
118
- begin loc = w.location; rescue; end
125
+ begin loc = w.location; rescue Exception; end
119
126
  loc && ( loc = loc.to_s )
120
127
  if ( loc && loc !~ %r((http?s|file|about):) )
121
128
  loc = "file://" + Pathname(loc).realpath.to_s
122
129
  end
123
130
  path = f
124
131
  if ( path !~ %r((http?s|file|about):) )
125
- path = "file://" + Pathname(path).realpath.to_s
132
+ begin
133
+ path = "file://" + Pathname(path).realpath.to_s
134
+ rescue Errno::ENOENT
135
+ return
136
+ end
137
+ end
138
+ if !loc || loc == "about:blank"
139
+ tll = "file://" + Pathname(top_level_js).realpath.to_s
140
+ if ( tll != path )
141
+ loc = tll
142
+ end
126
143
  end
127
144
  if loc and loc != "about:blank"
128
145
  on = db.call[loc+".on.yml"] || []
129
146
  on << path
147
+ on.uniq!
130
148
  db.call[loc+".on.yml"] = on
131
- by = db.call[path+".by.yml"] = []
149
+ by = db.call[path+".by.yml"] || []
132
150
  by << loc
151
+ by.uniq!
133
152
  db.call[path+".by.yml"] = by
134
- # $stderr.print "#{loc} on #{path}: #{db.call[loc+'.on.yml']}\n"
135
- # $stderr.print "#{path} by #{loc}: #{db.call[path+'.by.yml']}\n"
153
+ # $stderr.print "#{loc} on #{path}: #{db.call[loc+'.on.yml'].join(' ')}\n"
154
+ # $stderr.print "#{path} by #{loc}: #{db.call[path+'.by.yml'].join(' ')}\n"
136
155
  end
137
156
  end
138
157
  end
139
158
 
159
+ (class << self; self; end).send :define_method, :top_level_load do |path|
160
+ # $stderr.print "tll #{path}\n"
161
+ top_level_js = path
162
+ clear_deps.call( path )
163
+ end
164
+
140
165
  master.load = lambda { |*files|
141
166
  if files.length == 2 && !(String === files[1])
142
167
  f = files[0]
@@ -150,6 +175,19 @@ EOJS
150
175
  end
151
176
  }
152
177
 
178
+ master.reload = lambda { |*files|
179
+ if files.length == 2 && !(String === files[1])
180
+ f = files[0]
181
+ w = files[1]
182
+ v = open(f).read.gsub(/\A#!.*$/, '')
183
+ loc = nil
184
+ add_dep.call w, f
185
+ reevaluate(v, f, 1, w, w, f)
186
+ else
187
+ reload *files
188
+ end
189
+ }
190
+
153
191
  master.evaluate = lambda { |v,w|
154
192
  evaluate(v,"inline",1,w,w);
155
193
  }
@@ -178,6 +216,12 @@ EOJS
178
216
  end
179
217
  }
180
218
 
219
+ window.reload = lambda { |*files|
220
+ files.each do |f|
221
+ master.reload.call f, window
222
+ end
223
+ }
224
+
181
225
  ( class << self; self; end ).send :define_method, :wait do
182
226
  master["finalize"] && master.finalize.call
183
227
  master.timers && master.timers.wait
@@ -206,6 +250,18 @@ EOJS
206
250
  evaluate_compiled_script(compiled_script,scope)
207
251
  end
208
252
 
253
+ ( class << self; self; end ).send :define_method, :reevaluate do |*args|
254
+ ( script, file, line, global, scope, fn ) = *args
255
+ # print "eval in " + script[0,50].inspect + (scope ? scope.toString() : "nil") + "\n"
256
+ global = nil
257
+ scope ||= inner
258
+ compiled_script = compile(script, file, line, global)
259
+ if fn
260
+ scripts[fn] = compiled_script
261
+ end
262
+ evaluate_compiled_script(compiled_script,scope)
263
+ end
264
+
209
265
  @envjs = inner
210
266
 
211
267
  ( class << self; self; end ).send :define_method, :"[]" do |key|
@@ -13,5 +13,3 @@ test("window.location= following Envjs() initialization flagged as error",
13
13
  function(){
14
14
  expect(0);
15
15
  });
16
-
17
- //Envjs.wait();
Binary file
@@ -0,0 +1,209 @@
1
+
2
+ html, body {
3
+ margin: 0;
4
+ background: #FFFFFF;
5
+ font-family: Lucida Grande, Tahoma, sans-serif;
6
+ font-size: 11px;
7
+ overflow: hidden;
8
+ }
9
+
10
+ a {
11
+ text-decoration: none;
12
+ }
13
+
14
+ a:hover {
15
+ text-decoration: underline;
16
+ }
17
+
18
+ .toolbar {
19
+ height: 14px;
20
+ border-top: 1px solid ThreeDHighlight;
21
+ border-bottom: 1px solid ThreeDShadow;
22
+ padding: 2px 6px;
23
+ background: ThreeDFace;
24
+ }
25
+
26
+ .toolbarRight {
27
+ position: absolute;
28
+ top: 4px;
29
+ right: 6px;
30
+ }
31
+
32
+ #log {
33
+ overflow: auto;
34
+ position: absolute;
35
+ left: 0;
36
+ width: 100%;
37
+ }
38
+
39
+ #commandLine {
40
+ position: absolute;
41
+ bottom: 0;
42
+ left: 0;
43
+ width: 100%;
44
+ height: 18px;
45
+ border: none;
46
+ border-top: 1px solid ThreeDShadow;
47
+ }
48
+
49
+ /************************************************************************************************/
50
+
51
+ .logRow {
52
+ position: relative;
53
+ border-bottom: 1px solid #D7D7D7;
54
+ padding: 2px 4px 1px 6px;
55
+ background-color: #FFFFFF;
56
+ }
57
+
58
+ .logRow-command {
59
+ font-family: Monaco, monospace;
60
+ color: blue;
61
+ }
62
+
63
+ .objectBox-null {
64
+ padding: 0 2px;
65
+ border: 1px solid #666666;
66
+ background-color: #888888;
67
+ color: #FFFFFF;
68
+ }
69
+
70
+ .objectBox-string {
71
+ font-family: Monaco, monospace;
72
+ color: red;
73
+ white-space: pre;
74
+ }
75
+
76
+ .objectBox-number {
77
+ color: #000088;
78
+ }
79
+
80
+ .objectBox-function {
81
+ font-family: Monaco, monospace;
82
+ color: DarkGreen;
83
+ }
84
+
85
+ .objectBox-object {
86
+ color: DarkGreen;
87
+ font-weight: bold;
88
+ }
89
+
90
+ /************************************************************************************************/
91
+
92
+ .logRow-info,
93
+ .logRow-error,
94
+ .logRow-warning {
95
+ background: #FFFFFF no-repeat 2px 2px;
96
+ padding-left: 20px;
97
+ padding-bottom: 3px;
98
+ }
99
+
100
+ .logRow-info {
101
+ background-image: url(infoIcon.png);
102
+ }
103
+
104
+ .logRow-warning {
105
+ background-color: cyan;
106
+ background-image: url(warningIcon.png);
107
+ }
108
+
109
+ .logRow-error {
110
+ background-color: LightYellow;
111
+ background-image: url(errorIcon.png);
112
+ }
113
+
114
+ .errorMessage {
115
+ vertical-align: top;
116
+ color: #FF0000;
117
+ }
118
+
119
+ .objectBox-sourceLink {
120
+ position: absolute;
121
+ right: 4px;
122
+ top: 2px;
123
+ padding-left: 8px;
124
+ font-family: Lucida Grande, sans-serif;
125
+ font-weight: bold;
126
+ color: #0000FF;
127
+ }
128
+
129
+ /************************************************************************************************/
130
+
131
+ .logRow-group {
132
+ background: #EEEEEE;
133
+ border-bottom: none;
134
+ }
135
+
136
+ .logGroup {
137
+ background: #EEEEEE;
138
+ }
139
+
140
+ .logGroupBox {
141
+ margin-left: 24px;
142
+ border-top: 1px solid #D7D7D7;
143
+ border-left: 1px solid #D7D7D7;
144
+ }
145
+
146
+ /************************************************************************************************/
147
+
148
+ .selectorTag,
149
+ .selectorId,
150
+ .selectorClass {
151
+ font-family: Monaco, monospace;
152
+ font-weight: normal;
153
+ }
154
+
155
+ .selectorTag {
156
+ color: #0000FF;
157
+ }
158
+
159
+ .selectorId {
160
+ color: DarkBlue;
161
+ }
162
+
163
+ .selectorClass {
164
+ color: red;
165
+ }
166
+
167
+ /************************************************************************************************/
168
+
169
+ .objectBox-element {
170
+ font-family: Monaco, monospace;
171
+ color: #000088;
172
+ }
173
+
174
+ .nodeChildren {
175
+ margin-left: 16px;
176
+ }
177
+
178
+ .nodeTag {
179
+ color: blue;
180
+ }
181
+
182
+ .nodeValue {
183
+ color: #FF0000;
184
+ font-weight: normal;
185
+ }
186
+
187
+ .nodeText,
188
+ .nodeComment {
189
+ margin: 0 2px;
190
+ vertical-align: top;
191
+ }
192
+
193
+ .nodeText {
194
+ color: #333333;
195
+ }
196
+
197
+ .nodeComment {
198
+ color: DarkGreen;
199
+ }
200
+
201
+ /************************************************************************************************/
202
+
203
+ .propertyNameCell {
204
+ vertical-align: top;
205
+ }
206
+
207
+ .propertyName {
208
+ font-weight: bold;
209
+ }
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml">
5
+
6
+ <head>
7
+ <title>Firebug</title>
8
+ <link rel="stylesheet" type="text/css" href="firebug.css">
9
+ </head>
10
+
11
+ <body>
12
+ <div id="toolbar" class="toolbar">
13
+ <a href="#" onclick="parent.console.clear()">Clear</a>
14
+ <span class="toolbarRight">
15
+ <a href="#" onclick="parent.console.close()">Close</a>
16
+ </span>
17
+ </div>
18
+ <div id="log"></div>
19
+ <input type="text" id="commandLine">
20
+
21
+ <script>parent.onFirebugReady(document);</script>
22
+ </body>
23
+ </html>