Hi all Mozilla developers!
We need to write our application installed in Mozilla which should be
scriptable from javascript on insecure (not signed) pages. This
application should be multiplatform (at least Windows and Linux), but
it can't be written in pure javascript. What would be the best choice,
to make it scriptable component or scriptable plugin?
Here are our current observations:
Component
---------
+ It's simple to write one because only the scriptable interface
should be public.
- We don't know how to allow it to be accessed from insecure pages
without the 'netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");'
We implement the nsIClassInfo but it only allows to access the
interface but it doesn't solve the Components...createInstance() case.
- It's instalable only with root priviledges (there is no component
subdirectory in the user profile).
Plugin
------
- More complicated to write because we have to implement the NPP api
functions. Also is it possible to create plugin without bothering with
the NPWindow?
+ It solves the creation problem.
+ It's instalable in the user profile subdirectory
- Maybe it will be deprecated in the future???
So which way would you recommend?
Thank you for any answers.
Tom Mraz