XPCNativeWrapper is a way to wrap up an object so that it's safe to access from privileged code. It can be used in all Firefox versions, though the behavior changed somewhat starting with Firefox 1.1.
XPCNativeWrapper in Firefox versions prior to 1.1
In Firefox versions prior to 1.1, use of
XPCNativeWrapper requires manually constructing an
XPCNativeWrapper and passing it the object to be wrapped and the names of the methods/properties to be exposed as arguments. The resulting object exposes ONLY the methods/properties whose methods were passed as arguments. This is described in more detail in the the entry for
XPCNativeWrapper at the MozillaZine KnowledgeBase.