Closed Bug 334706 Opened 19 years ago Closed 19 years ago

[trunk] document.importNode can't import xhtml retrieved through XMLHttpRequest.ResponseXML into a xhtml document.

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: frederik.reiss, Unassigned)

Details

Attachments

(1 file, 3 obsolete files)

912 bytes, application/xhtml+xml
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060415 Firefox/3.0a1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060415 Firefox/3.0a1 document.importNode can't import xhtml retrieved through XMLHttpRequest.ResponseXML into a xhtml document. This works in firefox 1.5 and 2.0a1. On trunk builds document.importNode throws an exception: "NS_ERROR_DOM_NOT_SUPPORTED_ERR". Reproducible: Always Steps to Reproduce: Open testcase Actual Results: Exception: Error: uncaught exception: [Exception... "Object cannot be created in this context" code: "9" nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "file:///home/drd/test/ajax.js Line: 9"] Expected Results: import the responseXML
Attached file javascript for the test case (obsolete) —
Attached file the test case (obsolete) —
Comment on attachment 219047 [details] the test case ><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> ><html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Document.importNode</title> > <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/> > <script src="https://bugzilla.mozilla.org/attachment.cgi?id=219046" type="text/javascript"/> ></head> ><body> ><a href="javascript:loadFile(&quot;https://bugzilla.mozilla.org/attachment.cgi?id=219047&quot;);">loadMe</a> ></body> ></html> ><!-- >document.importNode can't import xhtml retrieved through XMLHttpRequest.ResponseXML into a xhtml document. >This works in firefox 1.5 and 2.0a1. On trunk builds document.importNode throws an exception: "NS_ERROR_DOM_NOT_SUPPORTED_ERR". > >-->
Comment on attachment 219047 [details] the test case ><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> ><html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Document.importNode</title> > <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/> > <script src="https://bugzilla.mozilla.org/attachment.cgi?id=219046" type="text/javascript"/> ></head> ><body> ><a href="javascript:loadFile(&quot;https://bugzilla.mozilla.org/attachment.cgi?id=219047&quot;);">loadMe</a> ></body> ></html> ><!-- >document.importNode can't import xhtml retrieved through XMLHttpRequest.ResponseXML into a xhtml document. >This works in firefox 1.5 and 2.0a1. On trunk builds document.importNode throws an exception: "NS_ERROR_DOM_NOT_SUPPORTED_ERR". > >-->
Attachment #219047 - Attachment is obsolete: true
Comment on attachment 219047 [details] the test case i'm to stupid to get this right ... save both files (the test case as index.xhtml and the javascript as test.js. then correct the path of the script in the xhtml file.
Attachment #219047 - Attachment is obsolete: false
Attached file testcase (obsolete) —
Attachment #219046 - Attachment is obsolete: true
Attachment #219047 - Attachment is obsolete: true
Attached file testcase
Better testcase, this doesn't rely on innerHTML to work (which was just fixed in that period).
Attachment #219059 - Attachment is obsolete: true
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Document nodes can't be imported (see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Core-Document-importNode). you probably want to import responseXML.documentElement.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: