WebPlugInViewFactory
A WebPlugInViewFactory object is used to create an NSView for a plug-in. The principal class in a plug-in bundle must conform to this protocol.
-
Creates a new plug-in view.
Declaration
Objective-C
+ (NSView *)plugInViewWithArguments:(NSDictionary *)argumentsParameters
argumentsArguments used in creating the view.
Return Value
The created view.
Discussion
This method returns an
NSViewobject that conforms to theWebPlugIninformal protocol. The arguments dictionary should be specified by the keys and objects described in Constants. This method is required.Availability
Available in OS X v10.3.9 and later.
-
The following constants define the keys used to access the values in the
argumentsdictionary passed in to theplugInViewWithArguments:method. Note thatWebPlugInBaseURLKeyandWebPlugInAttributesKeywill always correspond to data, the others may benil.Declaration
Swift
let WebPlugInBaseURLKey: String let WebPlugInAttributesKey: String let WebPlugInContainerKey: String let WebPlugInContainingElementKey: String let WebPlugInShouldLoadMainResourceKey: StringObjective-C
extern NSString *WebPlugInBaseURLKey; extern NSString *WebPlugInAttributesKey; extern NSString *WebPlugInContainerKey; extern NSString *WebPlugInContainingElementKey; extern NSString *WebPlugInShouldLoadMainResourceKey;Constants
-
WebPlugInBaseURLKeyWebPlugInBaseURLKeyThe base URL of the document containing the plug-in's view. Required key.
Available in OS X v10.3 and later.
-
WebPlugInAttributesKeyWebPlugInAttributesKeyThe
NSDictionaryobject containing all names and values of all attributes of the plug-in’s associated HTML element, as well as all names and values of the parameters to be passed to the plug-in. For example, this dictionary will contain allPARAMelements within anAPPLETelement. If attribute and parameter names conflict, the attributes of an element take precedence over any of its parameters. All keys and values in this dictionary must be of typeNSString. Required key.Available in OS X v10.3 and later.
-
WebPlugInContainerKeyWebPlugInContainerKeyAn object that conforms to the
WebPlugInContainerinformal protocol. This object is used for callbacks from the plug-in to the enclosing application. IfWebPlugInContainerKeyisnil, no callbacks will occur.Available in OS X v10.3 and later.
-
WebPlugInContainingElementKeyWebPlugInContainingElementKeyIf an element of the page’s Document Object Model was used to specify the plug-in, this will contain that element. Otherwise, it will be
nil.Available in OS X v10.3 and later.
-
WebPlugInShouldLoadMainResourceKeyWebPlugInShouldLoadMainResourceKeyA Boolean value indicating whether the plug-in should load its own main resource (the
srcURL, in most cases). IfYEStrue, the plug-in should load its own main resource. IfNOfalse, the plug-in uses the data provided by WebKit and thewebPlugInMainResourceDidReceiveData:message is sent to the plug-in when data is received. The default value isNOfalse.Available in OS X v10.6 and later.
-
Copyright © 2015 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2010-02-24
