Closed Bug 96341 Opened 23 years ago Closed 23 years ago

document.createCDATASection raises exception

Categories

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

x86
All
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: stummala, Assigned: jst)

References

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2)
Gecko/20010726 Netscape6/6.1
BuildID:    2001-08-13-09-trunk

document.createCDATASection("text") raised exception...


Error: uncaught exception: [Exception... "Component returned failure code:
0x80530009 [nsIDOMHTMLDocument.createCDATASection]"  nsresult: "0x80530009
(<unknown>)"  location: "JS frame ::
http://bubblegum.mcom.com/ngdriver/suites/dom1/cdoc009.html :: <TOP_LEVEL> ::
line 48"  data: no]



Reproducible: Always
Steps to Reproduce:
<script>
var txt=document.createCDATASection("sometext");
document.write(txt.data);
</script>

Actual Results:  none

Expected Results:  sometext
See also bug 89697.
Since there is no such thing as a CDATA section in HTML, the exception throwing
is correct. The exception thrown however is not helpful at all, but that is bug
89697.
Thoughts?
*** Bug 107016 has been marked as a duplicate of this bug. ***
Invalid, the DOM spec says we should throw the exception, so we do. The error is
now much more informative too.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
verified that the error message is more informative.
Status: RESOLVED → VERIFIED
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.