JavaScript::SpiderMonkeyJavaScript::SpiderMonkey is a Perl interface to the JavaScript Engine. | |
Download |
JavaScript::SpiderMonkey Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Mike Schilli and Thomas Busch
- Publisher web site:
- http://search.cpan.org/~tbusch/JavaScript-SpiderMonkey-0.19/SpiderMonkey.pm
JavaScript::SpiderMonkey Tags
JavaScript::SpiderMonkey Description
JavaScript::SpiderMonkey is a Perl interface to the JavaScript Engine. JavaScript::SpiderMonkey is a Perl interface to the JavaScript Engine.SYNOPSIS use JavaScript::SpiderMonkey; my $js = JavaScript::SpiderMonkey->new(); $js->init(); # Initialize Runtime/Context # Define a perl callback for a new JavaScript function $js->function_set("print_to_perl", sub { print "@_n"; }); # Create a new (nested) object and a property $js->property_by_path("document.location.href"); # Execute some code my $rc = $js->eval(q! document.location.href = append("http://", "www.aol.com"); print_to_perl("URL is ", document.location.href); function append(first, second) { return first + second; } !); # Get the value of a property set in JS my $url = $js->property_get("document.location.href"); $js->destroy();Requirements:· Perl Requirements: · Perl
JavaScript::SpiderMonkey Related Software