Implements phantom.injectJs() and WebPage.injectJs()