Closed
Bug 185189
Opened 23 years ago
Closed 23 years ago
Javascript code that uses "document" does not get executed if located in a .xml file
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 111514
People
(Reporter: vidal, Assigned: asa)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202
Cut-and-paste the following to a file called "t1.xml" and load it into moz.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<title>Test</title>
</head>
<body>
<script type="text/javascript">alert('hello-xml');</script> <!-- this works-->
<script type="text/javascript">document.cookie="testcookie-xml";</script> <!--
this fails-->
<script type="text/javascript">document.write('hello-xml');</script> <!-- this
fails-->
<h1>Hi</h1>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.See details section
2.Notice that the file has to end in .xml. Writing to a .html file works.
Actual Results:
The alert pops up, but the cookie does not show on the cookie manager and the
text is not written.
Expected Results:
Set the cookie and written the text.
dup of bug 182253? Please upgrade to 1.2.1
Comment 2•23 years ago
|
||
document.cookie and document.write are properties of the HTMLDocument object and
are not present in the DOM Core. We will maybe add support for them in
XHTML-as-XML at some point, but it's somewhat doubtful...
*** This bug has been marked as a duplicate of 111514 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 4•23 years ago
|
||
v
Comment 5•23 years ago
|
||
v
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•