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
DOM appendChild error in FF 4.0b7
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
  3 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
 
marco  
View profile  
 More options Nov 30 2010, 3:42 am
Newsgroups: mozilla.dev.extensions
From: marco <marco.donize...@gmail.com>
Date: Tue, 30 Nov 2010 00:42:40 -0800 (PST)
Local: Tues, Nov 30 2010 3:42 am
Subject: DOM appendChild error in FF 4.0b7
ciao all,

in FF 3.6.xx, extension code that modifies the DOM of an HTML page by
adding some elements (e.g. preview thumbnails) via method
"appendChild" within DOMContentLoaded callback, works fine.

in FF 4.0b7, exactly same code causes this exception to be thrown:

Error: uncaught exception: [Exception... "Operation is not supported"
code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)"
location: "chrome://myext/content/myext.js Line: ..."]

Any hint on how to resolve the above? Any restrictions added by Gecko
2.0 on extensions fiddling with unprivileged content?

Thanks a million in advance

m


 
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.
Jonathan Protzenko  
View profile  
 More options Nov 30 2010, 3:54 am
Newsgroups: mozilla.dev.extensions
From: Jonathan Protzenko <jonathan.protze...@gmail.com>
Date: Tue, 30 Nov 2010 09:54:21 +0100
Local: Tues, Nov 30 2010 3:54 am
Subject: Re: DOM appendChild error in FF 4.0b7
If you're modifying some content DOM from chrome code, you need to make
sure the child you're appending was created using the unprivileged
document, not the global document.

// This is chrome code, this is wrong because the span is now chrome and
you're trying to insert it into content
myContentNode.appendChild(document.createElement("span"))

// This is right, appending a content node to another content node
myContentNode.appendChild(myContentNode.ownerDocument.createElement("span") )

I've hit this issue at least three times when upgrading stuff for Gecko
2.0. Might be what you're looking for :).

jonathan


 
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.
Marco Donizelli  
View profile  
 More options Nov 30 2010, 4:25 am
Newsgroups: mozilla.dev.extensions
From: Marco Donizelli <marco.donize...@gmail.com>
Date: Tue, 30 Nov 2010 10:25:53 +0100
Local: Tues, Nov 30 2010 4:25 am
Subject: Re: DOM appendChild error in FF 4.0b7
indeed!!!! Thanks a million

m

On 30 November 2010 09:54, Jonathan Protzenko
<jonathan.protze...@gmail.com>wrote:


 
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 »