title: How to run custom Javascript on Wkhtmltopdf/wkhtmltoimage?
body: <p>I want to run a javascript on a website, but when I do it, nothing changes, I get the pdf as if I run no result of the javascript on it, this is an example of what I do:</p>
  
  <pre><code>xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltoimage --run-script "javascript:(\$(function(){ \$("div").hide()   ;}))" google.com google.png
  </code></pre>
  
  <p>I have also scripts without jquery like:</p>
  
  <pre><code>xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf --run-script "javascript:(function(){ document.write("AHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"); ;})" google.com p2.pdf
  </code></pre>
  
  <p>But as I said, no effect on the pdf or the png (because I have tried both wkhtmltoimage and wkhtmltopdf).</p>