Closed
Bug 76057
Opened 25 years ago
Closed 25 years ago
document.createElement().tagName, .nodeName not case-sensitive
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: WeirdAl, Assigned: jst)
Details
Attachments
(1 file)
|
350 bytes,
text/xml
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)
BuildID: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; 0.8.1) Gecko/20010323
Mozilla is returning a tag generated from lowercase letters as uppercase.
Reproducible: Always
Steps to Reproduce:
1. Run the following code in Mozilla as an HTML page.]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<body>
<script language="JavaScript" type="text/javascript">
<!--
x = document.createElement("span")
alert(x.tagName)
//-->
</script>
</body>
</html>
Actual Results: Alert window containing "SPAN".
Expected Results: Alert window containing "span".
For HTML, this is not a major problem. But for XHTML 1.0, and possibly for XML
documents in general, this is not helpful to the cause.
Possibly related to bug #76054, which I just posted. (At this time, the other
bug is still unconfirmed.)
| Reporter | ||
Updated•25 years ago
|
Summary: document.createDocument().tagName() not case-sensitive → document.createDocument().tagName not case-sensitive
| Reporter | ||
Comment 1•25 years ago
|
||
Oops -- included second <html> tag by mistake. Corrected page is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body>
<script language="JavaScript" type="text/javascript">
<!--
x = document.createElement("span")
alert(x.tagName)
//-->
</script>
</body>
</html>
| Reporter | ||
Updated•25 years ago
|
Summary: document.createDocument().tagName not case-sensitive → document.createElement().tagName, .nodeName not case-sensitive
| Assignee | ||
Comment 2•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
If you get 'SPAN' when loading your testcase you must have been feeding it to
mozilla as text/html and not text/xml, see the attached testcase.
Also, you had your whole script commented out, doing that will make mozilla not
see the script (intentionally), skip the '<!--' and '-->' inside your <script>
tag and things will start working. Having the comments in the <script> tags is a
HTML:ism that shouldn't be used in XML/XHTML.
Marking WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Comment 4•25 years ago
|
||
Thanks for the info. I finally got it to work. I changed the extension
for .htm (or .html) to .xml and it worked.
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•