Closed Bug 723645 Opened 13 years ago Closed 13 years ago

Bring back isSameNode, since Google Web Toolkit (GWT) <= v1.4 depends upon it

Categories

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

10 Branch
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox11 - ---
firefox12 - ---
firefox13 - ---

People

(Reporter: globe.control, Assigned: sicking)

References

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0) Gecko/20100101 Firefox/10.0 Build ID: 20120129021758 Steps to reproduce: I have an application compiled with Google Web Toolkit. The compiler widely uses isSameNode in onclick() events. Actual results: Now it is removed, the app isn't working in FF10. We can't upgrade GWT version quickly, i guess a lot of other developers also can't or won't. Expected results: It should work as in FF9
Severity: normal → critical
OS: Windows XP → All
Priority: -- → P5
Hardware: x86 → All
Blocks: 687400
Ignoring for the moment all these people not bothering to test the aurora and beta builds for some reason, I'd say the experiment to see whether the web depends on isSameNode failed and we should in fact reinstate it...
Summary: Return isSameNode! → Bring back isSameNode, since Google Web Toolkit (GWT) depends on it
Status: UNCONFIRMED → NEW
Ever confirmed: true
Jonas said in the removal bug "this was done to better support cross browser behaviour since not all browsers support this function. It was also done to help JS authors as == is faster than isSameNode. Also,isSameNode is likely going to to be removed from the specs, so there's only advantages to stop using it." I don't think that's sufficient reason to "break the web" and would prefer if we restore this capability if that was the total of the reasoning behind dropping it.
Keywords: dev-doc-needed
Dirty quick fix for Webmasters: In <head> section of your html add the following code: <script type="text/javascript"> if (!HTMLElement.prototype.isSameNode) HTMLElement.prototype.isSameNode = function(c) {return this===c;} </script>
Aww crap. Yeah, I think this means that we should put it back. I'd prefer to have a warning in there though and maybe we can remove it down the line.
Emm, for IE compatibility use try {if (!HTMLElement.prototype.isSameNode) HTMLElement.prototype.isSameNode = function(c) {return this===c;} } catch(e) {};
That we didn't find out about this until release is not encouraging at all.
Which version of GWT uses isSameNode? Based on the initial comment not the latest one.
I have read an article with the link here on Habrahabr, the largest IT web site in Russian. After doing a quick search on Google Code, I think the reporter of the bug should admit that he is not a professional. The last version of GWT implementing isSameNode for Mozilla was 1.4 and it was relaesed in August 2007 (please, see http://code.google.com/p/google-web-toolkit/source/diff?path=/trunk/user/src/com/google/gwt/user/client/impl/DOMImplMozilla.java&format=side&r=2030 and http://code.google.com/p/google-web-toolkit/source/detail?spec=svn2030&r=2030 for reference). I think it is not reasonable to support such an old software. @globe.control@gmail.com: Indeed, you are chainik.
Thank you for that analysis Timur. I think we can probably live with breaking a 4.5 year old version of GWT.
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #9) > Thank you for that analysis Timur. > > I think we can probably live with breaking a 4.5 year old version of GWT. We should not treat breaking real websites so cavalierly. I don't care how old the site is or the toolkit is, if we're not delivering serious value to users or developers, breaking sites is not acceptable.
Asa: It's not as simple as that. We can't keep every feature just because some website uses it. Every feature we have costs engineering resources to maintain so by keeping it we're choosing not to spend time on some other feature. But I also agree that the age of the library doesn't matter. What matters is how commonly used it is. So far we've heard of two websites breaking over this. If there aren't more turning up I'm leaning towards keeping things as-is.
(In reply to Jonas Sicking (:sicking) from comment #11) > But I also agree that the age of the library doesn't matter. What matters is > how commonly used it is. Sure, but those things are generally correlated. If somebody has data showing that this particular version of GWT is widely used then that's one thing, but given that we didn't find out about this until release I suspect that it is not.
There are plenty of alternate browsers available. It gets down to just how usable Firefox is vs others. At this point, FF10 is a significant PITB for a small number of users. How many of them will move to chrome? DarJones
Please note that the reason we removed isSameNode is because it was removed from the spec. I would expect the function to disappear from other browsers too in a not too distant future. We don't break websites out of malice. In this case we did it to reduce engineering effort (allowing us to work on other more important features) as well as align us with other browsers that didn't have the function implemented, thus making the web more cross-browser-friendly. Would you rather that we spent time making this absolutely useless function work (it does the same thing as the == operator which has existed for over 15 years) which also slows down websites (isSameNode is slower than ==), or would you rather that we spent time adding actually useful features?
(In reply to Jonas Sicking (:sicking) from comment #4) > Aww crap. Yeah, I think this means that we should put it back. I'd prefer to > have a warning in there though and maybe we can remove it down the line. Jonas - is anything preventing us from backing out 687400 on all branches? If not, can you nominate a patch prior to Tuesday 2/21 so that this can make it into our 4th FF11 beta? Would the use of https://blekko.com/webgrep prior to the removal have prevented this?
Assignee: nobody → jonas
Do we need to do this? We've gotten exactly one bug report about this, on an ancient version of GWT. I'm inclined to WONTFIX this bug.
Summary: Bring back isSameNode, since Google Web Toolkit (GWT) depends on it → Bring back isSameNode, since Google Web Toolkit (GWT) <= v1.4 depends upon it
Alex: I don't think we have enough data to show that we actually want to back out bug 687400 anywhere. We have gotten exactly two bugs filed on sites regressing due to missing isSameNode. According to comment 8, the last version of GWT to depend on isSameNode was released in 2007, so most likely it's not in wide use any more. This is further substantiated by the fact that we have had so few people complaining. Based on this I'm marking this bug WONTFIX to clearly indicate our current plan. This will give others a chance to speak up if they disagree.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Sounds like a plan. We'll re-open if the dupes start piling up. Untracking for release.
Removing doc needed keyword since this is WONTFIX and the docs already cover how to switch away from using this.
Keywords: dev-doc-needed
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.