views:

184

answers:

4

Hi, I'm trying to find any JavaScript frameworks whose sole aim is to standardize the DOM and JavaScript across all browsers.

What I'm not looking for is frameworks which create their own API to solve these common problems. I want something that will allow me to call for example myElement.dispatchEvent("click") in Internet Explorer. Not something that creates its own observer pattern with its own API.

At the moment the closest thing I can find is www.flowjs.com, this looks good and covers a lot but is missing document.createEvent and a few other features and supplies no contact information from the author.

Regards,

Chris

+3  A: 

Dean Edwards' Base2 might be what you're looking for. You might find Diego Perini's NWEvents interesting as well...

Christoph
Base2 looks extremely interesting!
ChrisInCambo
Base2 certainly is impressive. I also mentioned NWEvents, because its selector engine seems pretty fast: http://javascript.nwbox.com/NWMatcher/SLICKSPEED/
Christoph
Wow is quick, selectors weren't a big concern for this project. But I will keep it in mind for the future. Thanks
ChrisInCambo
A: 

Although it has its own API, Prototype tries to do that (at least partially). If you use Firebug, you can notice a lot of methods added to the DOM, in order to make the DOM equally in all browsers.

I know it's not exactly what you were looking for, but it's a half-way solution.

Also, in some browsers, it might not be possible to override some elements of the DOM. Try doing window.alert = function(i) {}; and it will raise errors in some browsers.

Alcides
A: 

There is Ample SDK framework that contains DOM-Events / DOM-Core, and many other standards implementations. Although, it is less known yet, I would strongly recommend taking look into that.

Also, please note, myElement.dispatchEvent("click") is not something standard.

Sergey Ilinsky
A: 

A comprehensive summary of JS libraries that standardize JS and DOM across browsers:

  1. base2
    Creator: Dean Edwards - http://dean.edwards.name/
    Project page: http://base2.googlecode.com/

  2. flowjs
    Creator: Richard Herrera - http://http://doctyper.com/
    Home page: http://flowjs.com/
    Project page: http://flowjs.googlecode.com/

  3. JDC
    Creator: Tavs Dokkedahl?? - http://www.jslab.dk/
    Project page: http://www.jslab.dk/projects.php

  4. SLAB
    Creator: Sean Hogan (that's me) - http://meekostuff.net/
    Project page: http://meekostuff.net/projects/SLAB

WARNING: these libraries may be larger than you are expecting. There's actually quite a lot of code required for IE6 / IE7.

Sean Hogan