Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Javascript running "under XUL" and add-on owner
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Yves Dolce  
View profile  
 More options Aug 21 2012, 4:59 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yves Dolce  
View profile  
 More options Aug 21 2012, 8:02 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yves Dolce  
View profile  
 More options Aug 21 2012, 8:08 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Y a Personne  
View profile  
 More options Aug 21 2012, 9:11 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
reverendlinux  
View profile  
 More options Aug 21 2012, 9:31 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil  
View profile  
 More options Aug 22 2012, 5:13 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Y a Personne  
View profile  
 More options Aug 22 2012, 6:12 am
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
reverendlinux  
View profile  
 More options Aug 22 2012, 10:04 am
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:

Simple!  Thanks...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yves Dolce  
View profile  
 More options Aug 22 2012, 6:03 pm
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

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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »