Javascript running "under XUL" and add-on owner
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: mozilla.dev.tech.xul
From:
Yves Dolce <yvesd... @gmail.com>
Date: Tue, 21 Aug 2012 13:59:34 -0700 (PDT)
Local: Tues, Aug 21 2012 4:59 pm
Subject: Javascript running "under XUL" and add-on owner
Hello everyone,
Two quick questions from a XUL newbie:
1. In Javascript, how can I detect I'm running in the context of XUL and not a plain Web page?
2. How can I know the name of the add-on who lead the call to my function? The add-on that I would find if I'd look at the call-stack.
Thanks a lot!
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Yves Dolce <yvesd... @gmail.com>
Date: Tue, 21 Aug 2012 17:02:49 -0700 (PDT)
Local: Tues, Aug 21 2012 8:02 pm
Subject: Re: Javascript running "under XUL" and add-on owner
And:
3. Can an executable be launched from an add-on?
Thanks again.
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Yves Dolce <yvesd... @gmail.com>
Date: Tue, 21 Aug 2012 17:08:19 -0700 (PDT)
Local: Tues, Aug 21 2012 8:08 pm
Subject: Re: Javascript running "under XUL" and add-on owner
Hmmm... Talking about XUL under/with Firefox of course.
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Y a Personne <yaperso... @gmail.com>
Date: Wed, 22 Aug 2012 03:11:52 +0200
Local: Tues, Aug 21 2012 9:11 pm
Subject: Re: Javascript running "under XUL" and add-on owner
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
reverendlinux <reverendli... @gmail.com>
Date: Tue, 21 Aug 2012 18:31:39 -0700 (PDT)
Local: Tues, Aug 21 2012 9:31 pm
Subject: Re: Javascript running "under XUL" and add-on owner
On Aug 21, 7:11 pm, Y a Personne <yaperso... @gmail.com> 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?
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Neil <n... @parkwaycc.co.uk>
Date: Wed, 22 Aug 2012 10:13:15 +0100
Local: Wed, Aug 22 2012 5:13 am
Subject: Re: Javascript running "under XUL" and add-on owner
reverendlinux wrote:
>On Aug 21, 7:11 pm, Y a Personne <yaperso
... @gmail.com> wrote:
>>Le 22/08/2012 02:02, Yves Dolce a écrit :
>>>3. Can an executable be launched from an add-on?
>>Yes, but Mozilla not like this function
>Really? How?
I think AMO will require specific editorial review to ensure that you don't abuse this before you can host your addon there.
-- Warning: May contain traces of nuts.
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Y a Personne <yaperso... @gmail.com>
Date: Wed, 22 Aug 2012 12:12:53 +0200
Local: Wed, Aug 22 2012 6:12 am
Subject: Re: Javascript running "under XUL" and add-on owner
Le 22/08/2012 03:31, reverendlinux a écrit :
> On Aug 21, 7:11 pm, Y a Personne <yaperso
... @gmail.com> 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();
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
reverendlinux <reverendli... @gmail.com>
Date: Wed, 22 Aug 2012 07:04:33 -0700 (PDT)
Local: Wed, Aug 22 2012 10:04 am
Subject: Re: Javascript running "under XUL" and add-on owner
On Aug 22, 4:12 am, Y a Personne <yaperso... @gmail.com> wrote:
> Le 22/08/2012 03:31, reverendlinux a écrit :
> > On Aug 21, 7:11 pm, Y a Personne <yaperso... @gmail.com> 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...
You must
Sign in before you can post messages.
You do not have the permission required to post.
Newsgroups: mozilla.dev.tech.xul
From:
Yves Dolce <yvesd... @gmail.com>
Date: Wed, 22 Aug 2012 15:03:19 -0700 (PDT)
Local: Wed, Aug 22 2012 6:03 pm
Subject: Re: Javascript running "under XUL" and add-on owner
On Wednesday, August 22, 2012 7:04:33 AM UTC-7, reverendlinux wrote:
> On Aug 22, 4:12 am, Y a Personne <yaperso
... @gmail.com> wrote:
> > Le 22/08/2012 03:31, reverendlinux a écrit :
> > > On Aug 21, 7:11 pm, Y a Personne <yaperso... @gmail.com> 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...
You must
Sign in before you can post messages.
You do not have the permission required to post.