Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Add info on calling js functions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
bronson committed Dec 23, 2013
1 parent 9482e5b commit 57beb23
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -31,6 +31,11 @@ evaluate some simple JavaScript
cxt = V8::Context.new
cxt.eval('7 * 6') #=> 42

call JavaScript functions

cxt.eval "function isTruthy(arg) { return !!arg }"
cxt.scope.isTruthy(0) #=> false

embed values into the scope of your context

cxt['foo'] = "bar"
Expand Down Expand Up @@ -173,4 +178,4 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[1]: https://github.com/cowboyd/libv8
[2]: http://code.google.com/p/v8/wiki/BuildingWithGYP
[2]: http://code.google.com/p/v8/wiki/BuildingWithGYP

0 comments on commit 57beb23

Please sign in to comment.