It is then not easy to comeup with a single interface. What I’m doing for haXe is the following :
- have the standard interface supporting the things supported by both IE6 and Firefox 1.0.x
- have several compilation flags to disable some fields and ensure more strict compatibility
ie5flag will ensure ie5 compatibility by disabling ie6-specific fields
w3cflag will disable fields that are not w3c compatible
Conditional compilation is really a great help there. In the future when interfaces improve I will add the latest FireFox 1.5 APIs that will be turned ON with
ff15 or another flag.
Other problem is inherent dynamicity of some fields, that can be of several types (Integer or String, with different formats). Having more strictly typed and sound API will be something interesting, but difficult to do. If I could get a hold on the guy responsible for all of this, I would have a few words to say to him
Hopefully haXe will greatly help developers to go through this jungle.