Hi All,
I am trying to run some dom manipulation operation through async function in phantomjs.
Because dom manipulation causes phantomjs to do relayouting of entire DOM. To run function async I have used setTimeout function but it seems like phantomjs simply ignores it.
then I have tried evaluateAsync but no success. Code sniped is given below.
I wanted to build Reactjs like virtual dom to avoid relayouting of full page. Can someone suggest me something to improve the page processing with phantomjs
page.onConsoleMessage = function(msg) {
console.log('The web page said: ' + msg);
};
page.open('/Users/somenamr/Desktop/test/test.html', function(status) {
if (status == 'success') {
page.evaluateAsync(function() {
console.log('This is not getting logged. Hi! I\'m evaluateAsync call!');
}, 1000);
var html = page.evaluate(function(s) {
window.console.log = function(msg) { alert(msg) };
function doProcessingOnWebPage(node)
{
console.log("this i am getting");
}});}});