Closed
Bug 41286
Opened 26 years ago
Closed 22 years ago
XUL DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
Future
People
(Reporter: tim, Assigned: hyatt)
References
Details
(Keywords: dom1, helpwanted)
Attachments
(1 file)
|
1.96 KB,
application/vnd.mozilla.xul+xml
|
Details |
According to the DOM Level 1 Core specification, entity references cannot be
dynamically added to a document attribute with just the "setAttribute" method:
"Adds a new attribute. If an attribute with that name is already present in
the element, its value is changed to be that of the value parameter. This
value is a simple string, it is not parsed as it is being set. So any
markup (such as syntax to be recognized as an entity reference) is treated
as literal text, and needs to be appropriately escaped by the implementation
when it is written out. In order to assign an attribute value that
contains entity references, the user must create an Attr node plus any Text
and EntityReference nodes, build the appropriate subtree, and use
setAttributeNode to assign it as the value of an attribute."
Given this, one should be able to add entity references to an attribute with
the following JavaScript code:
var atr = document.createAttribute("attribute");
var entref = document.createEntityReference("entityreference");
var el = document.createElement("element");
atr.appendChild(entref);
el.setAttributeNode(atr);
However, under XUL, createAttribute and createEntityReference throw a
NS_ERROR_NOT_IMPLEMENTED exception. I'm not sure if setAttributeNode is
implemented either since I can't get an attribute node to pass to it.
Under HTML, createAttribute works, and createEntityReference correctly returns
NS_ERROR_DOM_NOT_SUPPORTED_ERR.
I have not tested this with any other XML documents.
Comment 1•26 years ago
|
||
Is this a blocker for bug 2800, Tim? If so, mark it. If not, ignore me. :-)
Bug 9850 is related to this; createEntityReference is not implemented for
general XML documents either.
Summary: DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode → XUL DOM1 Unimplemented Methods: createEntityReference, createAttribute, possibly setAttributeNode
Comment 3•26 years ago
|
||
confirming so waterson can take a look at this
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: other → All
Hardware: PC → All
Comment 4•26 years ago
|
||
-> mfuture
Comment 5•26 years ago
|
||
Chris, taking this off your plate as this is DOM related. We'll work on this
post Netscape 6.
Assignee: waterson → nisheeth
Status: ASSIGNED → NEW
Updated•25 years ago
|
Component: DOM Level 1 → DOM Core
Comment 8•25 years ago
|
||
Mathods are not implimented for XUL. So its like not having FEATURE COMPLETE.
Nominating for nsbeta1. Adding keywords mozilla0.9.1, nsbeta1.
Keywords: mozilla0.9.1,
nsbeta1
Since XUL DOM, reassigning to hyatt.
Assignee: nisheeth → hyatt
Target Milestone: Future → ---
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 11•25 years ago
|
||
would a fix for this bug include implementing createAttributeNS ?
Comment 12•25 years ago
|
||
Comment 13•23 years ago
|
||
wfm Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030611 -- DOM
Inspector confirms "no error" textnodes added per testcase.
I believe bug 124412 fixed this.
Comment 14•23 years ago
|
||
Clarification: with the fix for bug 124412, this becomes a dupe of bug 9850,
per comment 2 of this bug.
Comment 15•22 years ago
|
||
*** This bug has been marked as a duplicate of 9850 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
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
•