Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
appendChild
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
  8 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
 
Todd Keup  
View profile  
 More options Mar 1 2009, 5:16 pm
Newsgroups: mozilla.dev.tech.dom
From: "Todd Keup" <t...@magnifisites.com>
Date: Sun, 1 Mar 2009 16:16:08 -0600
Local: Sun, Mar 1 2009 5:16 pm
Subject: appendChild
I read the recent quote on the Mozilla site, from the appendChild page
https://developer.mozilla.org/en/DOM/element.appendChild

############

Note: Starting in Firefox 3.1, you can no longer use this method to append
script elements that retrieve their code from anything other than chrome:
URLs.

############

I have been searching trying to find changelogs or discussion on this
proposed change in Firefox. Unless I am misunderstanding the note on the
Mozilla documentation page for appendChild, we will no longer be able to
append a <script> element in the following manner:

        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = 'test.js';
        document.getElementsByTagName('head')[0].appendChild(script);

Other browsers will allow DOM manipulation using these methods, so I
question why is this change being incorporated in Firefox?


 
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.
Boris Zbarsky  
View profile  
 More options Mar 1 2009, 5:33 pm
Newsgroups: mozilla.dev.tech.dom
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Sun, 01 Mar 2009 17:33:21 -0500
Local: Sun, Mar 1 2009 5:33 pm
Subject: Re: appendChild

Todd Keup wrote:
> I read the recent quote on the Mozilla site, from the appendChild page
> https://developer.mozilla.org/en/DOM/element.appendChild

> ############
> Note: Starting in Firefox 3.1, you can no longer use this method to append
> script elements that retrieve their code from anything other than chrome:
> URLs.

This is only the case for chrome documents, not in general, as I recall.
  You might want to double-check with the documentation author,
though...  Maybe I missed something.

-Boris


 
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.
Sheppy  
View profile  
 More options Mar 2 2009, 5:56 am
Newsgroups: mozilla.dev.tech.dom
From: Sheppy <the.she...@gmail.com>
Date: Mon, 2 Mar 2009 02:56:05 -0800 (PST)
Local: Mon, Mar 2 2009 5:56 am
Subject: Re: appendChild
On Mar 1, 5:33 pm, Boris Zbarsky <bzbar...@mit.edu> wrote:

> Todd Keup wrote:
> > I read the recent quote on the Mozilla site, from the appendChild page
> >https://developer.mozilla.org/en/DOM/element.appendChild

> > ############
> > Note: Starting in Firefox 3.1, you can no longer use this method to append
> > script elements that retrieve their code from anything other than chrome:
> > URLs.

> This is only the case for chrome documents, not in general, as I recall.
>   You might want to double-check with the documentation author,
> though...  Maybe I missed something.

This comes from bug 425153 and 418356.  Nothing I see in those bugs
says that the limitation is restricted to chrome documents, that I can
find.  If this is in error, I'd appreciate it if someone would let me
know for certain so I can revise the documentation appropriately.

Eric Shepherd
Developer Documentation Lead
Mozilla Corporation
http://www.bitstampede.com/


 
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.
Boris Zbarsky  
View profile  
 More options Mar 2 2009, 10:26 am
Newsgroups: mozilla.dev.tech.dom
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Mon, 02 Mar 2009 10:26:11 -0500
Local: Mon, Mar 2 2009 10:26 am
Subject: Re: appendChild

Sheppy wrote:
> This comes from bug 425153 and 418356.  Nothing I see in those bugs
> says that the limitation is restricted to chrome documents, that I can
> find.  If this is in error, I'd appreciate it if someone would let me
> know for certain so I can revise the documentation appropriately.

Ah, I see.

The change in bug 425153 makes sure that any <script> loaded from a
document that gets XPCNativeWrapper automation also gets
XPCNativeWrapper automation.  It does affect whether script are loaded.
  It does affect XBL loading: XBL that does not get XPCNativeWrapper
automation cannot be applied to a node in a document that does.

The change in bug 418356 doesn't affect <script> loading behavior at
all; it merely affects whether scripts loaded programmatically ia the
subscript loader get XPCNativeWrapper automation.  They're forced to if
the loading code does.

Neither one affects appendChild behavior in terms of whether the script
executes; all that's affected is whether the executing script gets
XPCNativeWrapper automation.  This is relevant only to chrome documents,
of course.

The one recent change I know of that affected _whether_ scripts are
loaded (or rather whether they're executed) is bug 424426.  This affects
only documents in a signed jar, and only allows such documents to
execute scripts whose principal subsumes the principal of the document
(in practice, either chrome scripts or scripts from a signed jar on the
same server and signed with the same signing certificate).  That change
was made for 1.9.0, though.

-Boris


 
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.
Boris Zbarsky  
View profile  
 More options Mar 2 2009, 10:28 am
Newsgroups: mozilla.dev.tech.dom
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Mon, 02 Mar 2009 10:28:14 -0500
Local: Mon, Mar 2 2009 10:28 am
Subject: Re: appendChild

Boris Zbarsky wrote:
> Neither one affects appendChild behavior in terms of whether the script
> executes; all that's affected is whether the executing script gets
> XPCNativeWrapper automation.  This is relevant only to chrome documents,
> of course.

And we _do_ probably want to document this in the documentation that
discusses XPCNativeWrapper automation, or something.

It might be good if bugs always included a summary of what the patch
does.  That would probably help the documentation work a good bit.
Eric, please feel free to point out cases when a bug asks for
documentation and doesn't have such a summary?

-Boris


 
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.
Sheppy  
View profile  
 More options Mar 2 2009, 12:26 pm
Newsgroups: mozilla.dev.tech.dom
From: Sheppy <the.she...@gmail.com>
Date: Mon, 2 Mar 2009 09:26:07 -0800 (PST)
Local: Mon, Mar 2 2009 12:26 pm
Subject: Re: appendChild
On Mar 2, 10:28 am, Boris Zbarsky <bzbar...@mit.edu> wrote:

> Boris Zbarsky wrote:
> > Neither one affects appendChild behavior in terms of whether the script
> > executes; all that's affected is whether the executing script gets
> > XPCNativeWrapper automation.  This is relevant only to chrome documents,
> > of course.

> And we _do_ probably want to document this in the documentation that
> discusses XPCNativeWrapper automation, or something.

> It might be good if bugs always included a summary of what the patch
> does.  That would probably help the documentation work a good bit.
> Eric, please feel free to point out cases when a bug asks for
> documentation and doesn't have such a summary?

I've been doing that lately when it wasn't reasonably clear what was
needed.  This particular change seemed obvious, although apparently it
wasn't. Because the bug specifically mentioned cases that had
incorrect behavior, I assumed those cases were all fixed as described,
and that's what I documented.  I'll try to do a better job of double-
checking those things going forward.

I'd appreciate it if you could revise the documentation in question,
as I'm actually more unclear now than ever as to what needs to be
done. :)

Eric Shepherd
Developer Documentation Lead
Mozilla Corporation
http://www.bitstampede.com/


 
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.
Boris Zbarsky  
View profile  
 More options Mar 2 2009, 12:36 pm
Newsgroups: mozilla.dev.tech.dom
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Mon, 02 Mar 2009 12:36:57 -0500
Local: Mon, Mar 2 2009 12:36 pm
Subject: Re: appendChild

Sheppy wrote:
> I'd appreciate it if you could revise the documentation in question,
> as I'm actually more unclear now than ever as to what needs to be
> done. :)

OK.  I've just removed the incorrect text from the appendChild article,
since there was no change to appendChild behavior.

I don't really know what the right place is to document the
XPCNativeWrapper automation behavior; if you can point me to the article
that discusses it right now I can try to document it.

-Boris


 
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.
Todd Keup  
View profile  
 More options Mar 2 2009, 2:22 pm
Newsgroups: mozilla.dev.tech.dom
From: "Todd Keup" <t...@magnifisites.com>
Date: Mon, 2 Mar 2009 13:22:31 -0600
Local: Mon, Mar 2 2009 2:22 pm
Subject: Re: appendChild
I had tested the assumed revision in a beta version of 3.1b to test the
feature and I can indeed appendChild <script> elements without issue so I
was wondering when the *break* was going to occur ... and it's not.  I
appreciate the confirmation.  Thanks fellas.

Sheppy, thanks for the heads up and the direction.  I'll watch for the
documentation update ;)


 
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 »