Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: how to access HTML within a javascript

by Anonymous Monk
on Mar 20, 2013 at 07:00 UTC ( #1024456=note: print w/ replies, xml ) Need Help??


in reply to Re: how to access HTML within a javascript
in thread how to access HTML within a javascript

While you're not going to find a Perl module with an embedded JavaScript interpreter,

:) those things are hard to write WWW::Scripter/WWW::Scripter::Plugin::JavaScript/WWW::Scripter::Plugin::Ajax


Comment on Re^2: how to access HTML within a javascript
Re^3: how to access HTML within a javascript
by tobyink (Abbot) on Mar 20, 2013 at 07:49 UTC

    Indeed. WWW::Scripter is powered by JE, a very good pure Perl Javascript implementation. Other Javascript implementations for Perl include JavaScript::SpiderMonkey and JavaScript::V8 which are generally faster but offer poorer integration between the Javascript code and the Perl code.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

      I'm reading the documentation for WWW::Scripter::Plugin::Javascript and it's not immediately clear to me how to use it to access the HTML that is released by the html.js script that runs on the webpage. Do I somehow use WWW::Scripter::Plugin::Javascript to force the script to run on the website and then capture the output?

        I'm reading the documentation for WWW::Scripter::Plugin::Javascript and it's not immediately clear to me how to use it to access the HTML that is released by the html.js script that runs on the webpage. Do I somehow use WWW::Scripter::Plugin::Javascript to force the script to run on the website and then capture the output?

        No. The plugin adds support to the browser (WWW::Scripter) so it can execute javascript on webpages -- sometimes it works, sometimes it doesn't, its alpha-quality

        It seems you have a conceptual gap in your knowledge, see learn about the internet,Web Programming: For Beginners, to get an overall picture of how the internet works, how tcp/ip, sockets, websites, html, ajax, all fit together.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024456]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2015-07-03 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls