I think you can find the answer in JSEventListener::handleEvent method.

JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext,
> m_isolatedWorld.get());
> ...
> ExecState* exec = globalObject->globalExec();


2011/10/12 Per Bothner <[email protected]>

> In our WebNode implementation (part of JavaFX) we have a class
> JavaEventListener, which extends WebCore::EventListener.
> The virtual handleEvent method takes a ScriptExecutionContext*
> and an Event*, as in the parent class.  This methods needs to map the
> WebKit Event to a Java Event.
>
> The Java Event object needs access to the ExecState.  (The reason is
> that the Java Event object has methods like getSrcElement, which
> return a Java Node object, and for convenience this Node object also
> has access to the corresponding JavaScript object.  The various
> JavaScript operations make use of JSGlobalContextRef which is the
> same as ExecState.)
>
> So the question is there an approved way to get from a
> ScriptExecutionContext
> to an ExecState/CallFrame/**JSGlobalContextRef?  I've looked through the
> source code, but haven't found the solution.
> --
>        --Per Bothner
> [email protected]   [email protected]   http://per.bothner.com/
> ______________________________**_________________
> webkit-help mailing list
> [email protected]
> http://lists.webkit.org/**mailman/listinfo.cgi/webkit-**help<http://lists.webkit.org/mailman/listinfo.cgi/webkit-help>
>
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to