This interface allows Firefox to expose different implementations of its own
classes to add-ons. Once an interposition is created, it must be assigned to
an add-on using Cu.setAddonInterposition (JS) or xpc::SetAddonInterposition
(C++). In both cases, the arguments should be the add-on ID and the
interposition object (which must be an nsIAddonInterposition). This must
happen before any compartments are created for the given add-on.
Every time the add-on accesses a property on any object outside its own set
of compartments, XPConnect will call the interposition’s
interpose method. If the interposition wants to replace the given
property, it should return a replacement property descriptor for it. If not,
it should return null.
Returns a replacement property descriptor for a browser object.
addonId | The ID of the add-on accessing the property. |
target | The browser object being accessed. |
iface | The IID of the interface the property is associated with. This parameter is only available for XPCWrappedNative targets. As such, it's only useful as an optimization to avoid instanceof checks on the target. |
prop | The name of the property being accessed. |
A property descriptor or null. |