Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

DOM Manipulation #6

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

Comments

Projects
None yet
2 participants

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.

Owner

fzaninotto commented Jul 23, 2012

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.

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

Owner

fzaninotto commented Jul 23, 2012

It is normal that you don't see the logs - the phantomjs process is spawned
from the main process. In order to debug, you should start the
rasterizer.js script manually using the phantomjs command.

2012/7/23 Max <
reply@reply.github.com

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


Reply to this email directly or view it on GitHub:

#6 (comment)

@MaximOrlovsky MaximOrlovsky reopened this Jul 23, 2012

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment