Closed
Bug 358670
Opened 18 years ago
Closed 15 years ago
Make Firefox 2.0.0.x warn when I use nodes in the wrong document
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jruderman, Assigned: peterv)
References
Details
Attachments
(1 file)
7.13 KB,
patch
|
Details | Diff | Splinter Review |
Trunk will soon throw WRONG_DOCUMENT_ERR when nodes are used in the wrong document, in order to comply with DOM specs and make interoperability with Safari easier. (See bug 47903.) Firefox 2.0.0.x should put a warning in the Error Console in the same situation, so extension and web developers will be more likely to notice their bugs before Firefox 3 comes out and breaks their code.
(Originally suggested by bz, bug 47903 comment 39.)
Updated•18 years ago
|
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
Version: Trunk → 1.8 Branch
Assignee | ||
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
Comment on attachment 247570 [details] [diff] [review]
v1
>+ errorText.AppendASCII("Passing a node that has the wrong ownerDocument to "
>+ "a DOM method. Future versions will throw "
>+ "DOCUMENT_ERR exceptions, either create the node in "
>+ "the right document or use adoptNode or importNode "
>+ "to get a node with the right ownerDocument.");
This is a comma splice, I believe; how about:
Passing a node that has the wrong ownerDocument to a DOM method; future Gecko versions will throw DOCUMENT_ERR exceptions. Either create the node in the right document or use adoptNode or importNode to get a node with the right ownerDocument.
(i.e., replace the period with a semicolon, uncapitalize "Future", change the comma after "exceptions" to a period, and capitalize "either"; I also added Gecko for greater clarity, but that's just my opinion that it's better that way)
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Comment 4•17 years ago
|
||
Why is this WONTFIX? Surely if the peril to developers of not knowing that their code is in violation of holy exception writ was worth risking major site breakage, it's still worth warning them about it. s/"Future versions"/"Strictly specification-compliant implementations"/ and go?
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Comment 5•17 years ago
|
||
Fine, I'm just pessimistic of the effect a warning like this will have.
Status: REOPENED → ASSIGNED
Comment 6•15 years ago
|
||
If this is still an option, I think it would be worth the experiment to see if we developers can be persuaded to move towards the spec (although perhaps rewording the warning might be warranted now). It's obviously rather too late for 2.x, but warnings won't break any sites, and another step away from browser-specific code could benefit web development and the ordinary user in the long run. Isn't part of the purpose of adopting web specifications to progress away from the demand on web developers to write several variations on numerous fragments (sometimes totalling a sizable portion) of web code?
Reporter | ||
Comment 7•15 years ago
|
||
Too late for Firefox 2.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 15 years ago
Resolution: --- → WONTFIX
Comment 8•15 years ago
|
||
Understandable, but is there a definitive answer on whether this will ever be seen in 3.something, or has the prospect of trying to persuade web developers to move towards the spec on this been abandoned?
Reporter | ||
Comment 9•15 years ago
|
||
It was made to throw in bug 47903, but that was reverted in bug 418755.
Comment 10•15 years ago
|
||
Yeah, I could see how throwing would cause excessive collateral damage, because of how long it was taken for granted that Firefox would not do so. What I was asking is, do you think it would be worthwhile at this point to simple add a warning or message in the console -- since web developers (presumably) watch it while testing their sites?
Reporter | ||
Comment 11•15 years ago
|
||
Given bug 418755 comment 28, seems unlikely.
You need to log in
before you can comment on or make changes to this bug.
Description
•