In a story yesterday we reported that the right click features in MSN were not working right in current versions of Firefox. A programmer at MSN immediately provided us information suggesting that the problem was really an issue in Firefox. To it’s credit, the MSN team immediately implemented a work-around so that right clicks are back.
The method used by them is very interesting. They essentially create an equalized version of Firefox and IE by adding an attachEvent method to every DOM element in Firefox. By doing this, they can later — site wide — avoid the typical browser detection and the corresponding repeat of scripts that say,
see if this is IE and if so, then this, but if it is FF, then do something else, or if Opera, then do the other, etc.
It avoids duplicative coding, and avoids the necessity of changing each of those scripts should there be a bug like arose here. Equally important, they don’t need to train each developer regarding the differences in API between browsers.
April 10th, 2020 at 4:16 am
We would like to thank you for sharing your thoughts. Appreciate it!
Kamloops Electrician