On Mar 21, 2011, at 4:48 PM, Per Bothner wrote:

> Some Googling found references to webkit_web_frame_get_global_context() and
> WebFrame::globalContext() but I didn't find these - maybe they're 
> Cacoa-specific?

webkit_web_frame_get_global_context is a GTK WebKit call.

I think WebFrame::globalContext() is from the Mac Windows port of WebKit.

The Cocoa call for this is named -[WebFrame globalContext].

Depending on what platform you’re building on there will be some way to get the 
global context, and from there you can get the global object, which is the 
window object if the global context is for a webpage frame.

> The latter might be more efficient, but only as long as a the 
> JSGlobalContextRef is stable.

You’ll have one JSGlobalContextRef for each window object. It will only change 
when you load a new document into a frame or go away when you close the frame.

At this point, though, I realize that I’m giving webkit-help kinds of 
information on webkit-dev that is supposed to be about development of WebKit, 
not use of WebKit for development of something else.

    -- Darin

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to