[Webkit-unassigned] [Bug 91159] DOMImplementation::createDocument incorrectly throws a WRONG_DOCUMENT_ERR
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 18 14:13:40 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=91159
--- Comment #5 from Ojan Vafai (vacation through 7/31) <ojan at chromium.org> 2012-07-18 14:13:39 PST ---
(In reply to comment #4)
> This test doesn't check that original document no longer has a doctype after createDocument. However, this is indeed what happens in Firefox in my testing.
Yeah, it doesn't affect the compatMode of the page though.
> I guess it depends on the level of one's familiarity with the API. To me, having DOM modified when document's doctype is used as an argument in createDocument call is surprising - the form of this call doesn't suggest that original document is modified.
I can see that argument. It doesn't seem much weirder to me than appendChild/insertBefore though.
> What does IE do?
I'm on vacation now, so don't have easy acces to IE. Haven't tested it.
> Perhaps we have an opportunity to actually improve the Web here, and not just mimic a Gecko quirk.
I don't see throwing an exception here as better. In practice, people almost never use this API. It's not terribly useful. Given that, I think doing the simplest thing is better. IMO, just adoptNode'ing the Node seems simpler to me and it's more consistent with the other DOM modification APIs (appendChild, insertBefore, etc).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list