This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 244 - hc_elementinuseattributeerr tries to insert a <p> into an <abbr>
Summary: hc_elementinuseattributeerr tries to insert a <p> into an <abbr>
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 1 (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-27 16:56 UTC by David Faure
Modified: 2003-06-28 20:46 UTC (History)
0 users

See Also:


Attachments
patch (1.31 KB, patch)
2003-06-28 16:44 UTC, Curt Arnold
Details

Description David Faure 2003-06-27 16:56:34 UTC
The DOM level1 test hc_elementinuseattributeerr.html contains this code: 
      addressElementList = doc.getElementsByTagName("abbr"); 
      testAddress = addressElementList.item(1); 
      newElement = doc.createElement("p"); 
      appendedChild = testAddress.appendChild(newElement); 
 
This tries to insert a <p> into an <abbr> tag, which doesn't support it. 
This results in a HIERARCHY_REQUEST_ERR in Konqueror. 
Shouldn't the test be changed to insert a <p> into something that supports it, 
like <body>? Or is this a Konqueror bug, and inserting a <p> into an <abbr> should be 
allowed?
Comment 1 Curt Arnold 2003-06-28 16:44:51 UTC
Created attachment 32 [details]
patch
Comment 2 Curt Arnold 2003-06-28 16:46:46 UTC
That test (like all the hc_*) tests was transliterated from the XML tests.  
There wasn't an intention to create an invalid HTML document and insist that an 
implementation tolerate it.  That the created element is even attached to a 
document, let alone where, should be inconsequential to that tests objectives.  
I've modified the tests to add the created <p> to <body> element.

The patch changes the addition point to the body element as you suggested.