Open
Bug 481552
Opened 16 years ago
Updated 2 years ago
Error message not meaningful for document.write() in XHTML
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: BijuMailList, Unassigned)
References
()
Details
Please feel free to reclassify, I am to not sure whether this is right component
While visiting http://www.chanezon.com/pat/code/html5/video/index.xhtml
I get following error on jserr console
Error: uncaught exception: [Exception... "Operation is not supported" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "http://www.chanezon.com/pat/code/html5/video/index.xhtml Line: 55"]
I dont know whether this same as bug 480366, it is telling about same message in sessionStorage, but I dont see sessionStorage in this sites code.
Flags: blocking1.9.1?
Comment 1•16 years ago
|
||
The offending code:
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
Out of curiosity, why should this block?
Summary: Error message not meaning full → Error message not meaningful
Comment 2•16 years ago
|
||
Definitely not JS Engine (Biju note well: if you see NS_ERROR_... and ...DOM... you are seeing stuff to-do with XPCOM and the DOM, respectively -- or together and at the same time!). From the URL, I'd guess this is <video> scripting related.
/be
Assignee: general → nobody
Component: JavaScript Engine → Video/Audio
QA Contact: general → video.audio
Comment 3•16 years ago
|
||
The page is doing a document.write, and it's an XHTML document. This is an error and this is what the error message is referring too.
Updated•16 years ago
|
Component: Video/Audio → DOM
OS: Windows XP → All
QA Contact: video.audio → general
Hardware: x86 → All
Summary: Error message not meaningful → Error message not meaningful for document.write() in XHTML
![]() |
||
Comment 4•16 years ago
|
||
There is no specific error code for this operation. And honestly, I don't think there needs to be.
So please explain what user should understand from the message provided by Firefox
when doing following
* Goto http://www.chanezon.com/pat/code/html5/video/index.xhtml
* you get above error in "Error Console"
* you click on the error
- Strange !!! it dont take to source code as many others
* So you open the view-source
* copy source to your text editor.
* goto line 55 as the error message show the line 55
- you see cursor at
"<a href="https://developer.mozilla.org/En/Manipulating_video_using_canvas">"
What should I understand from this error message?
I am getting JS error because there is "https" link !!!
![]() |
||
Comment 6•16 years ago
|
||
> * copy source to your text editor.
Did you remember to turn off the view-source auto-wrapping first? If not, the line numbers in your text editor WILL NOT MATCH the line numbers in view-source or the original site. If I use go-to-line in view-source (Cmd-L on Mac, Ctrl-L on Windows or Linux) and type in "55", the highlighted text is:
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
> What should I understand from this error message?
That you're misusing view-source, apparently.
The missing link in the error console is indeed an issue; we have bugs on that.
![]() |
||
Comment 7•16 years ago
|
||
> Did you remember to turn off the view-source auto-wrapping first?
To be precise, the View menu in view-source, "Wrap Long Lines" option. Note that the site has some _very_ long lines that end up on 6+ lines in view-source when wrapped.
That said, I just checked in my text editor (emacs), and it does keep the long lines as single lines. So the issue is something else. More precisely, there are some newlines that are getting introduced when you copy that are not in the original source. Given where they fall, looks like they're on the <pre> boundaries in view-source. That's worth filing a bug on, probably.
(In reply to comment #7)
> boundaries in view-source. That's worth filing a bug on, probably.
created bug 481990, i see this in other pages also
Said that clicking on error console should take you to the error line
and we need better message example
a={};
a.b()
gives message "a.b is not a function"
so why cant we have something like
"document.write(...) Operation is not supported on XHTML document"
![]() |
||
Comment 9•16 years ago
|
||
> gives message "a.b is not a function"
That's a JavaScript engine message.
> why cant we have something like "document.write(...) Operation is not
> supported on XHTML document"
Because that would require introducing a separate DOM status code for this particular error, and teaching all sorts of places about it. Why is this error more important than any other place where the DOM requires that NOT_SUPPORTED_ERR is thrown?
That said, the fact that this exception doesn't get linkified is just a bug. I've filed bug 482137.
Comment 10•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•