Widget Plug-in Interface
The following sections describe the methods of the Widget Plug-in interface.
Default initializer for your plug-in.
- (id) initWithWebView:(WebView*)webView
Use this method to perform basic initialization of your widget’s principal class. The
webView parameter contains the view object used to display the widget contents. This method is called before your widget’s HTML page is fully loaded.
Implementation of this method is required.
Indicates that a scriptable object is now available.
- (void) windowScriptObjectAvailable:(WebScriptObject *) windowScriptObject
When your plug-in receives the
windowScriptObjectAvailable: message, call the
The following example registers an instance of the MyScriptObject class:
- (void) windowScriptObjectAvailable:(WebScriptObject *) scriptObj
MyScriptObject* myObj = [[MyScriptObject* alloc] init];
[scriptObj setValue:myObj forKey:@"MyScriptObj"];
© 2004, 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-02-04)