mark kaplun wrote: > Benjamin Smedberg wrote:
QI the object to nsISVGValue. That is a pseudo-interface implemented by nsSVGMatrix that a JS object can't implement.
Please don't do it this way. IIRC when xpconnect wrap the JS object it first ensures that the JS object implements all of the reqired interfaces, so QI
What "required interfaces"? The only thing that xpconnect ensures is that the JS object implements nsIDOMSVGMatrix, which is not enough... we want to ensure that we are passed *our implementation* of nsIDOMSVGMatrix.
will probably not help you to know if the object is a C++ or JS object. In
JS objects cannot implement nsISVGValue, because that pseudo-interface is declared in a C++ .h file, not in an .idl file, so there is no typelib information for xpconnect to use to proxy the interface.
any case I think that you should not limit the ability to call setMatrix from JS unless you redefine the function as a nonscript one in the IDL file.
It's part of the DOM, it can't be [noscript]. The goal is not to limit who can call setMatrix, but to sanity-check the parameters.
--BDS _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
