Skip to content
This repository

DOM Manipulation #6

Closed
MaximOrlovsky opened this Issue July 22, 2012 · 5 comments

2 participants

Maxim Orlovsky Francois Zaninotto
Maxim Orlovsky

Is there a place where I can make DOM manipulation before render? Working with DOM in 'scripts/rasterizer.js' in 'server.listen' doesnt give any results.

Francois Zaninotto
Owner

I believe you're looking at the right place - your manipulations should occur before line 84. If it doesn't work, this is a phantomjs problem.

Maxim Orlovsky

Yes, Francois. This is the first place that i tried, but it doesn't work. Even when I made a few 'console.log(...)' and add some 'response.write(..)' inside 'service = server.listen...' I did not see any messages in console or response.

My next move: I comment whole file rasterizer.js, reboot nodejs and phantomjs — the app works as usual, makes screenshots as usual. But when I made empty file rasterizer.js — phantomjs shows error, when I left in file only one line of code — console.log('rasterizer text') — nodejs shows me this message and makes the screenshot.

I also tried node-inspector to debug the app. But I never rich inside 'service = server.listen...' of rasterizer.js

I understand all of this sounds strange, but I tried to find the solution a couple of days and did not found the reason. I really looking for your help.


System Centos
NodeJs 0.6.18
PhantomJs 1.6.1

Francois Zaninotto
Owner
Maxim Orlovsky MaximOrlovsky closed this July 23, 2012
Maxim Orlovsky MaximOrlovsky reopened this July 23, 2012
Maxim Orlovsky

Yes, its spawned, but I see messages ( console.log(...) ) before 'service = server.listen...' in the console.

Maxim Orlovsky

Everything is ok, it was my fault. Now messages are showing even from 'service = server.listen...'
Thanks for your help. Sometimes we need to write problem to understand it.

Maxim Orlovsky MaximOrlovsky closed this July 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.