So, you want to get around the restrictions of the xpcom interfaces for
your object implemented in JS.
Sounds like you need to understand xpconnect's "double wrapping" and use
of the 'wrappedJSObject' property. See:
http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/idl/nsIXPConnect.idl#270
There are various usage examples in mozilla:
http://lxr.mozilla.org/mozilla/search?string=wrappedJSObject
John.
Lev Serebryakov wrote:
I've implemented nsITreeView in JS. And I want to add ability to set
some custom properties to this implementation directly:
"tree.view.someMyProp = val;".
I've added "nsISecurityCheckedComponent" interface to my component
and returns "allAccess" for "canCreateWrapper()" and
"can(G|S)etProperty()" if propertyName == "someMyProp".
XPCOM asks me for wrapper, but NEVER asks for properties, and I got
error NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN when try to set "someMyProp".
What should I do to enable modification of some my custom properties
in such case?
P.S. Please, answer me by e-mail, if you see this article. It seems,
tath my articles are posted directly into /dev/null :(
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom