Inject JS code in CasperJS script
Opened this issue · 2 comments
jcontesse commented
I would like to inject JS code to the final script to do things not provided in this wrapper like:
casper.page.paperSize = {
width: (8.5 * 96) + 'px',
height: (11 * 96) + 'px',
orientation: 'portrait',
margin: '0px'
}
or any other code that might be needed. Something like:
$casper->addToScript(<<<FRAGMENT
... JS code ...
FRAGMENT);
alwex commented
Sounds like a good idea to be able to "support new casper JS features" between updates.
Can you open a pull request?
alwex commented
Hi,
I have released v1.3.0
that come with this feature.
I hope it is what you are after.