Re: Javascript running "under XUL" and add-on owner

Yves Dolce <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Organization http://groups.google.com
Message-ID <[email protected]>
On Wednesday, August 22, 2012 7:04:33 AM UTC-7, reverendlinux wrote:
> On Aug 22, 4:12 am, Y a Personne <[email protected]> wrote:
> 
> > Le 22/08/2012 03:31, reverendlinux a écrit :
> 
> >
> 
> > > On Aug 21, 7:11 pm, Y a Personne <[email protected]> wrote:
> 
> > >> Le 22/08/2012 02:02, Yves Dolce a écrit :
> 
> >
> 
> > >>> And:
> 
> > >>> 3. Can an executable be launched from an add-on?
> 
> >
> 
> > >>> Thanks again.
> 
> >
> 
> > >> Yes, but Mozilla not like this function
> 
> >
> 
> > > Really?  How?
> 
> >
> 
> > With XPCom.
> 
> >
> 
> > This code start the calculator on Windows
> 
> >
> 
> > const Cc = Components.classes;
> 
> > const Ci = Components.interfaces;
> 
> >
> 
> > var aFile = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
> 
> >
> 
> > aFile.initWithPath('C:\\windows\\system32\\calc.exe');
> 
> >
> 
> > aFile.launch();
> 
> 
> 
> Simple!  Thanks...

It looks like being able to retrieve Components.stack is enough to detect if I'm coming from XUL and not JS on a web page...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.