Why implementing the IE DOM in Mozilla is a bad idea


I wouldn't have thought this document would ever be necessary, but given that bug 154589 exists, I thought I'd write down the large number of reasons why implementing non-standard features, and the IE DOM in particular, is a terrible idea which should be rejected out of hand. In no particular order:
  1. It would break sites which work now. Many sites sniff for document.all, and then use IE-specific code, and only then check for document.getElementById to send standards-compliant code. This is sensible for them, because IE also supports document.getElementById. Unless our IE DOM implementation was 100%, these sites, which worked previously, would break. Any argument which says we can get away with less than 100% is wrong.
  2. It's complicated and largely undocumented. The MSDN documentation won't be nearly enough. Reverse-engineering the IE DOM would be an enormous undertaking; and we'd need to get it pretty much correct - because it undoubtedly our fault if we claim we can run IE DOM code and then get it wrong.
  3. It would divide our effort. The Mozilla project does not have infinite resources; certainly, less than Microsoft can affort to put on the IE team. Having to maintain and QA two DOMs would mean less time spent improving either of them. In the initial period, we'd be flooded with bugs on the new IE DOM support.
  4. It would increase complexity. Having two event models in the code would mean branches everywhere the behaviour differed, making the code larger and more complex. Mozilla already has a bloat problem.
  5. It would break Mozilla's standards-compliance. According to jst, the main Mozilla DOM hacker, the W3C DOM event model and the IE DOM event model cannot co-exist - implementing the IE DOM event model as IE does would mean breaking our standards-compliance in the W3C DOM.
  6. It would mean we lied. Our Evangelism team has told many sites that we will not support proprietary extensions. Many companies have spent money upgrading their sites to conform to the standards because of this. If we then start supporting these extensions, they will have wasted their money, and be justifiably annoyed. It will also make them much less likely to listen to us in future.
  7. It would annoy our allies. Currently, Mozilla is supported by many groups of people - web developers who want to code to a single API, people who are anti-Microsoft on principle or for ethical reasons, people who use non-Windows platforms. These people are often techies and web developers, influential in their companies. Many Mozilla developers also feel this way. We throw away a lot of that support and help if we implement proprietary features.
  8. It would cede control of the Web. One company having control of any web standards is a bad idea for everyone except that company.  The only way the web will ever be free is if all sites and all browsers use the W3C DOM, and the only way that will happen is if Microsoft's customers demand better support so they can support all browsers with one lot of code, and the IE DOM slowly falls into disuse.
  9. It would mean that we would always have to play catch-up. If we implement the IE DOM, we would be continually fixing our implementation as more IE quirks that sites relied upon came to light, and as new versions of IE were released. We'd never be totally compatible, because we'd always be implementing what was already out there. Why would anyone ever use us if all we were was a bad IE clone?
  10. It would mess up other browser vendors. Konqueror, iCab, Opera, embedded browser vendors etc. would almost certainly have to cave in on this issue if we did - giving them all of the problems and burdens described above. This is particularly a problem for embedded browser vendors, who need to keep things simple.
  11. It would mean we have to implement any other proprietary stuff. Currently, we can refuse any suggestions of proprietary addons with "we don't do that." If we throw away that justification, we would have no defence when someone wanted us to implement any other proprietary extensions (such as document.layers.) This makes evangelism much harder, because when we ask for a change, web authors can say "Well, you implemented the IE DOM - just implement this."
  12. It would snatch defeat from the jaws of victory. The Mozilla/Netscape evangelism team has done a fantastic job; after a load of hard work over a couple of years, most top sites on the web now work with Mozilla as-is. And the number is climbing all the time.
So, if non-standard features are a bad idea, what do we do instead? It's true, the battle is not yet won - but here are some ways that you can help:
While I welcome comments on anything I write, I'd rather not get into long email arguments about this subject. I'm happy to correct factual errors, and add additional points to this page.

Gerv