Closed
Bug 285958
Opened 20 years ago
Closed 20 years ago
JavaScript only semifunctional on xhtml served as xml
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jwkenne, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Although JavaScript works on XHTML served as XML, but labeled as XHTML by both
DOCTYPE and HTTP-EQUIV, in that the DOM is correctly manipulated, elements
created are rendered as no-ops. In this instance, the <em> created might as well
be <span>.
If running locally, the JS works when the file is named *.xhtml and fails when
it is named *.xml.
Reproducible: Always
Comment 1•20 years ago
|
||
This bug may be invalid. AFAIK you have to use document.createElementNS()
instead of document.createElement() when manipulating the DOM of XML (including
XHTML, SVG, etc.) documents. I'm not absolutely sure about this, though. Leaving
as "unconfirmed" for the moment...
| Reporter | ||
Comment 2•20 years ago
|
||
If so, there is a curious inconsistency, because A) the very same, byte-for-byte
identical documents work when they are served as "application/xml+xhtml", and B)
everything /except/ JavaScript works fine when XHTML is served as "text/xml".
(Unfortunately, the webserver I am using, over which I have no control, serves
*.xhtml as text/plain, but serves *.xml as text/xml.)
Comment 3•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050831
Firefox/1.0+ ID:2005083106
Behavior is persistent in the latest nightly. However, I agree with comment 1
about the validity of this bug. The behavior when not using createElementNS is
undefined, so quirky behavior can be expected. Marking as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•