js-console.pl - send STDIN to the Javascript Console
echo "Hello World" | js-console.pl
Options: --clear Clear console before sending text --mozrepl connection string to Firefox --close automatically close the tab at the end of input --type TYPE Fix the type to 'html' or 'text'
Clear the console before sending the text.
Send the text TEXT instead of reading from STDIN.
Connection information for the mozrepl instance to use.
This program sends text read from standard input to the Javascript Console in Firefox. This can be convenient if you want to do testing and log the start or stop of a test run to the console.
https://developer.mozilla.org/en/Error_Console
https://developer.mozilla.org/en/nsIConsoleService - the underlying Console Service that also shows how to listen to events getting added.
To install WWW::Mechanize::Firefox, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Firefox
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Firefox
For more information on module installation, please visit the detailed CPAN module installation guide.