Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Are there any characters which will cause the document.write failed?

0 views
Skip to first unread message

byang

unread,
Oct 12, 2008, 11:11:05 AM10/12/08
to
Hi,
I got a strange error when I calling document.write(some string)
method in my extension. The error is something like :

Error: [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.write]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
chrome://library/content/menu.js :: anonymous :: line 156" data: no]
Source File:chrome://library/content/menu.js
Line: 156

The string passed to document.write is just a web page string fetched
with AJAX call...

Could you please give me some advice on this?

Thanks in advance!

Regards!
Bo

Boris Zbarsky

unread,
Oct 12, 2008, 1:35:16 PM10/12/08
to
byang wrote:
> Error: [Exception... "Component returned failure code: 0x80040111
> (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.write]" nsresult:
> "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
> chrome://library/content/menu.js :: anonymous :: line 156" data: no]
> Source File:chrome://library/content/menu.js

Odd. That does sound like a failure somewhere inside the parser, but I
don't see how that would get propagated out... Nor should we have such
failures.

> Could you please give me some advice on this?

Can you put together a publicly available testcase?

-Boris

byang

unread,
Oct 13, 2008, 2:57:59 AM10/13/08
to
On 10月13日, 上午1时35分, Boris Zbarsky <bzbar...@mit.edu> wrote:
> byang wrote:
> > Error: [Exception... "Component returned failure code: 0x80040111
> > (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.write]" nsresult:
> > "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
> > chrome://library/content/menu.js :: anonymous :: line 156" data: no]
> > Source File:chrome://library/content/menu.js
>
> Odd. That does sound like a failure somewhere inside the parser, but I
> don't see how that would get propagated out... Nor should we have such
> failures.
>
Ah-oh, I guess FF3 must not support doc.open, doc.write,doc.close as
perfectly as FF2. I have changed the three methods call to
element.innerHTML to convert some string to DOM, and success.

Regards!

Martijn

unread,
Oct 13, 2008, 6:17:23 AM10/13/08
to byang, dev-apps...@lists.mozilla.org
2008/10/13 byang <Techra...@gmail.com>:

If you could give an example testcase that shows it failing, then
Boris might find out why it is failing and if it's considered a bug in
Firefox 3, then it might get fixed.

Regards,
Martijn


> Regards!
> _______________________________________________
> dev-apps-firefox mailing list
> dev-apps...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-firefox
>

--
Martijn Wargers - Help Mozilla!
http://weblogs.mozillazine.org/qa/
http://wiki.mozilla.org/Mozilla_QA_Community
irc://irc.mozilla.org/qa - /nick mw22

Boris Zbarsky

unread,
Oct 13, 2008, 10:35:15 AM10/13/08
to
byang wrote:
> Ah-oh, I guess FF3 must not support doc.open, doc.write,doc.close as
> perfectly as FF2.

Not much has changed there. Any changes to support were certainly not
intentional.

> I have changed the three methods call to
> element.innerHTML to convert some string to DOM, and success.

You know... it helps to file bugs if you want them to get fixed. Hard
to fix a problem if you won't tell us about it.

-Boris

0 new messages