[webkit-dev] How to execute a JavaScript containing site with JSCore?

Sebastian Linke Seb_Linke at web.de
Wed Jun 10 22:05:46 PDT 2009


Hi,

based on my experiences when I ran some javascript code on a webkit context, 
I was trying to do the same with "normal" html code. 

It may sound a bit naive, but I simply passed the whole content of a website 
to `JSEvaluateScript()`, using `JSGlobalContextCreate(NULL)` as the context.

This did - as almost expected - not work. The only result I got back was 
`undefined`. 

So my question is: How does webkit handle this? In what kind of way is a 
javascript containing website given to the js engine to get back the right 
result after code execution (e.g. today's date displayed on the screen)?

Or do things not go the way I think about and there is no html generated
return value sent from JSCore? (Hope you know what I mean...)

Regards

Sebastian

PS: My code example: http://paste.pocoo.org/show/122370/
___________________________________________________________________
WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und 
Telefonanschluss für 17,95 Euro/mtl.! http://produkte.web.de/go/02/



More information about the webkit-dev mailing list