Closed
Bug 9777
Opened 25 years ago
Closed 25 years ago
Text::splitText() doesn't work when given Text::length
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
FIXED
M11
People
(Reporter: dbaron, Assigned: waqar)
References
()
Details
If you call textNode.splitText(textNode.length), it should leave the original text node unchanged and should return an empty text node. Right now it is stopping JS execution (although it ought to throw an exception when out-of-bounds): http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/Text
Target Milestone: M11
Marking for beta, just because.
HTML DOM bugs are M11/P2 for Vidur.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
SplitText is returning the NS_DOM_INDEX_SIZE_ERR. This is the correct thing to per DOM spec.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Comment 4•25 years ago
|
||
Reopening. Now that exceptions are working, it should return that when the argument is *greater than* length, but not when it is equal to length. That was the point of the bug. To quote from the DOM1 spec: INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data. It's just as reasonable to pass Text::length as it is to pass 0 - both should create one empty text node and one text node with all the text.
Reporter | ||
Updated•25 years ago
|
Resolution: INVALID → ---
Reporter | ||
Comment 5•25 years ago
|
||
In line 1 of previous comment, s/return that/throw INDEX_SIZE_ERR/
The fix is checked in and should be working in the next release.
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 8•25 years ago
|
||
dbaron, could you regress this bug? The URL for this bug appears to no longer be available. I'll close this out on Wednesday unless I hear otherwise from you. Thanks!
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 9•25 years ago
|
||
Verified fixed, Linux apprunner 1999-10-25-08-M11, including the bug marked as a duplicate. The URL seems fine to me.
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•