matra wrote:
- is it possible to enable UniversalXPConnect for internet pages?
Yes, if you sign them. If you're not able or not willing to do this, we can't
trust them enough to give them free run of the user's machine, of course.
- is it possible to grant JavaScript access to just specific XPCOM component
instead of granting access to all components with UniversalXPConnect
(UniversalXPConnect looks like a very dangerous beast)
If you control the XPCOM component, then yes. Depending on what you mean by
"grant JavaScript access to" you want some combination of the following:
1) Implementing nsISecurityCheckedComponent (to allow access to specific
properties or methods).
2) Implementing nsIClassInfo with the right magic flags (claiming to be a DOM
class?). This will, for example, allow same-origin access to properties and
methods unless something else overrides that access level.
3) Installing an accessor (constructor or service accessor?) for your component
on Window objects. For example, see how XMLHttpRequest used to work before
it got moved into the core code...
- is there any other extension technology available, which would not require
UniversalXpConnect. For example:
- creating plugin object (how?)
Yes. See <http://www.mozilla.org/projects/plugins/npruntime.html>.
-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom