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

2009-06-15 Thread Geoffrey Garen
Is there a straigthforwarded way to collect all the relationships between the site's object and to get a js-context of it? What I want in the end is to get access on the `document`-element, e.g. to perform calls like `document.forms`. If you have a JSContextRef that corresponds to a

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

2009-06-13 Thread Sebastian Linke
Actually I was focussing on how a context is created based on the html code of a website. Is there a straigthforwarded way to collect all the relationships between the site's object and to get a js-context of it? What I want in the end is to get access on the `document`-element, e.g. to

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

2009-06-11 Thread Geoffrey Garen
Hi Sebastian. JSEvaluateScript can only evaluate JavaScript; it can't parse HTML. Cheers, Geoff On Jun 10, 2009, at 10:05 PM, Sebastian Linke wrote: 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

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

2009-06-10 Thread Sebastian Linke
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