Thanks Geoff, But I think I¹m still faced with the same problem. If I want ALL pages associated with all possible WebViews to have access to my external objects/properties, does this still not require me to reinitialize the global object (via the context reference) at each page load? What I¹m trying to accomplish is to have my extended global object be the default object for all webview/page lists.
It¹s 6pm and my brain hurts. Thanks for any help/insight you can provide. Confused in Schaumburg, Ross Lillie On 3/12/09 5:37 PM, "Geoffrey Garen" <gga...@apple.com> wrote: > Hi Ross. > >> While I can grab the JSGlobalContext reference from a WebView's mainFrame, >> and subsequently use the public JS APIs to extend the underlying JS global >> object, I believe that subsequent WebView allocations will cause the >> underlying JSGlobalObject to be reinitialized forcing me to 're-extend' the >> object using the public APIs. > > It's a page load, not a WebView allocation, that clears the data in a > JSGlobalContext. > > Here is the delegate callback you need: > webView:didClearWindowObject:forFrame: > <http://developer.apple.com/documentation/Cocoa/Reference/WebKit/Protocols/Web > FrameLoadDelegate_Protocol/Reference/Reference.html%23//apple_ref/occ/instm/NS > Object/webView:didClearWindowObject:forFrame:> > > Cheers, > Geoff >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev