File tree Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -457,25 +457,6 @@ static VALUE _rb_js_proc_to_js(VALUE obj) {
457
457
return jsvalue_s_new (rb_js_abi_host_proc_to_js_function ((uint32_t )obj ));
458
458
}
459
459
460
- /*
461
- * Document-module: JS
462
- *
463
- * The JS module provides a way to interact with JavaScript from Ruby.
464
- *
465
- * == Example
466
- *
467
- * A simple eval and object access:
468
- *
469
- * require 'js'
470
- * JS.eval("return 1 + 2") # => 3
471
- * JS.global[:document].write("Hello, world!")
472
- * JS.global[:document].addEventListner("click") do |event|
473
- * puts event # => # [object MouseEvent]
474
- * puts event[:detail] # => 1
475
- * end
476
- *
477
- */
478
-
479
460
/*
480
461
* Document-class: JS::Object
481
462
*
Original file line number Diff line number Diff line change 1
1
require "js.so"
2
2
3
+ # The JS module provides a way to interact with JavaScript from Ruby.
4
+ #
5
+ # == Example
6
+ #
7
+ # require 'js'
8
+ # JS.eval("return 1 + 2") # => 3
9
+ # JS.global[:document].write("Hello, world!")
10
+ # JS.global[:document].addEventListner("click") do |event|
11
+ # puts event # => # [object MouseEvent]
12
+ # puts event[:detail] # => 1
13
+ # end
14
+ #
15
+ module JS
16
+ end
17
+
3
18
class JS ::Object
4
19
def method_missing ( sym , *args , &block )
5
20
if self [ sym ] . typeof == "function"
You can’t perform that action at this time.
0 commit comments