var x = new XMLHttpRequest();x.onreadystatechange = function() {console.log("I'm in with status: " + x.status);if (x.status === 200 && x.readyState === 4) {console.log("ciao");}}x.open("GET", "http://www.google.com", true);x.send(null);
undefined:0 INVALID_STATE_ERR: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.I'm in with status: 0
Interesting idea, use the file module to create dynamic js files. Json encode data and then use the injectjs method of a webpage .
That sounds like http://code.google.com/p/phantomjs/issues/detail?id=28.
--
Ariya Hidayat, http://ariya.ofilabs.com
page.evaluate can return an object just fine. See some of the
examples, find them using:
git grep '= page.evaluate'