Open
Bug 370580
Opened 17 years ago
Updated 2 years ago
Loading a non-JavaScript file with a script tag results in a misleading message
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: jason.barnabe, Unassigned)
References
()
Details
A <script> tag that refers to an HTML file in its src attribute produces an error as if it was trying to parse the HTML as XML. For example, loading google.com in a script tag gives Error: missing = in XML attribute Source File: http://google.com/ Line: 6, Column: 13 Source Code: <script defer> This is misleading - making the file valid XML doesn't help in this situation. The error should instead say something about the file not being JavaScript.
Comment 1•17 years ago
|
||
How is it supposed to figure out that the file isn't JavaScript? I guess there could be a warning about the text/html mime type before the parse error.
Reporter | ||
Comment 2•17 years ago
|
||
Yes, I was thinking by the MIME type. Do we try to parse the content regardless of the MIME type? If not, just say something about the MIME type. If so, the generic "Error loading script" that it gives when the server doesn't respond would be preferable to an XML parsing error. See also bug 370583.
Updated•10 years ago
|
Assignee: general → nobody
Comment 3•6 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
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•