nsISupports
Last changed in Gecko 1.7 In Gecko, a "capability" is a string identifying a set of actions that code is allowed to perform. Two examples:
<input type="file">
and access an arbitrary file on disk.Standard web pages have no special capabilities. Extensions can define their own capabilities and use this interface to only allow access to code trusted with that capability. The two special return values of '"allAccess" or "noAccess" unconditionally allow or deny access to the operation. All code has the "allAccess" capability, and no code has the "noAccess" capability.
This interface is used in Mozilla by XPConnect and a handful of things that need special handing (XUL controllers, the UI for the <video>
tag, etc.).
string canCallMethod(in nsIIDPtr iid, in wstring methodName); |
string canCreateWrapper(in nsIIDPtr iid); |
string canGetProperty(in nsIIDPtr iid, in wstring propertyName); |
string canSetProperty(in nsIIDPtr iid, in wstring propertyName); |
Returns a capability string indicating what permissions are required to call the specified method on the given interface.
string canCallMethod( in nsIIDPtr iid, in wstring methodName );
iid
methodName
The capability required to call this method. See Capability strings for details.
Returns a string indicating what permissions are required to create a wrapper for the given interface.
string canCreateWrapper( in nsIIDPtr iid );
iid
The capability required to reflect this interface. Note that if wrapper creation is prevented, the properties and methods will not be defined on the JavaScript object, whereas if wrapper creation succeeds but methods/properties are prevented, the properties and methods will be visible, not not usable. See Capability strings for details.
Returns the permissions required to get the specified property on the given interface.
string canGetProperty( in nsIIDPtr iid, in wstring propertyName );
iid
propertyName
The capability required to get the property. See Capability strings for details.
Returns the permissions required to set the specified property on the given interface.
string canSetProperty( in nsIIDPtr iid, in wstring propertyName );
iid
propertyName
The capability required to set the property. See Capability strings for details.