Kornel Lesinski asked:
 Where can I find authoritative list of standard
 (i.e. future-compatible, non-deprecated)
 JS properties for HTML/CSS manipulation?

If you stick to the DOM Core, you can't go wrong. Basically, that means using a small but powerful arsenal of methods and properties like:
getElementById
getElementsByTagName
getAttribute
setAttribute,
etc.


When in doubt, I always go for the standardised DOM way of doing something even if it's more verbose, e.g. I'll use:
element.getAttribute("href")
instead of:
element.href


I'm using W3C DOM and events (I don't care about IE-compatibility)

Actually, IE has very good DOM support. IE's problem is that it supports too much: it has all those proprietary methods and properties which, even though many of them have been implemented by Mozilla and other browsers, are *not* part of the standardised DOM. innerHTML springs to mind.


 Should I stick to pure DOM or is select.options, select.selectedIndex
 the right way?

Well, when it comes to the "forms" object, that isn't going anywhere. It's part of the HTML-DOM which is here to stay.
selectedIndex is a good example of a situation where the DOM Core doesn't really offer an alternative.


 Which way of getting position and size of elements on page is supposed
 to be the proper one?

Ah, the CSS-DOM. A whole other kettle of fish :-)

Wherever possible, try to use the "style" property: element.style.styleProperty
The big problem with reading style properties like this is that it only works when the style properties have either been set using JavaScript or using inline styles. In other words, it *won't* pick up styles declared in external stylesheets :-(


So, yeah, it is a bit of a jungle out there.

Peter Paul Koch has done a lot of research on browser compatibility with various DOM methods (both standard and proprietary). His website is:
http://www.quirksmode.org/


--
Jeremy Keith

a d a c t i o

http://adactio.com/

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to