DOM Wrapper

D

danjourno

Hello all,

I have been trying to search for a Basic DOM wrapper for simple DOM
functions. I am wondering if someone can recommend any of the
exisiting Javascript Frameworks that possibly provide something like
this. I don't want something too high level, just something that gives
me very basic access to the DOM but has cross browser compatibility,
if there is such a thing.

Regards
Daniel
 
D

David Dorward

I have been trying to search for a Basic DOM wrapper for simple DOM
functions. I am wondering if someone can recommend any of the
exisiting Javascript Frameworks that possibly provide something like
this. I don't want something too high level, just something that gives
me very basic access to the DOM but has cross browser compatibility,
if there is such a thing.

So long as you avoid having any elements having an id that matches the
name of a different element, and use direct property access rather
than setAttribute, then basic DOM is implemented pretty consistently
across browsers.

As libraries go, I generally use YUI (which does normalise things
across browsers quite nicely). http://developer.yahoo.com/yui/
 
D

David Mark

Hi, Dean Edward's Base2 is probably what you are after.
See herehttp://dean.edwards.name/weblog/2007/08/names/
andhttp://code.google.com/p/base2/

It is just as you want, not a 2MB fully-fledged 'all bells and whistles'
'all singing and dancing' js library', but just a tiny library to patch
up browser differences when using the DOM, especially broken DOM events.

I looked at that a few months ago. It does a lot of browser sniffing
and also augments host objects.

For simple DOM wrappers, there has been a lot of progress made in the
last few days in the group's "Code Worth Recommending" project.
Events are on ths short list of topics to address.
 
D

David Mark

So long as you avoid having any elements having an id that matches the
name of a different element, and use direct property access rather
than setAttribute, then basic DOM is implemented pretty consistently
across browsers.

That only covers two DOM functions. Add two more to the list
(setAttribute and gEBTN) and things get exponentially worse.
As libraries go, I generally use YUI (which does normalise things
across browsers quite nicely).http://developer.yahoo.com/yui/

It is better than some of the other popular libraries, but seems like
overkill for smoothing out DOM differences. And every time I look at
one of its modules or documentation, I spot signs that the developers
are less than adept at browser scripting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top