-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
JS::Object#apply
method to call JS function without receiver
This method is similar to `JS::Object#call`, but it is used to call a function that is not a method of an object. ```ruby floor = JS.global[:Math][:floor] floor.apply(3.14) # => 3 JS.global[:Promise].new do |resolve, reject| resolve.apply(42) end.await # => 42 ```
- Loading branch information
1 parent
f96ff58
commit aee363b
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters