brothercake
07-24-2003, 06:35 PM
For a script where it detects, and uses appropriate methods, so that it works on XHTML pages regardless of which DOM it's in.
At the moment, I'm testing for document.createElementNS and document.styleSheets, but it's messy - Safari declares support for both but the DOM 2 CSS doesn't actually work ... IE supports document.styleSheets but it uses a proprietary rule syntax ... Opera 7 doesn't support that but it does support createElementNS.
So instead of testing for support with named-browser exclusions, I thought maybe test for the XML DOM ... but then is it safe to assume that any JS-capable browser which is in the XML DOM supports the required methods?
Or is this all bunk ... should I just be pragmatic and test for Gecko ..?
At the moment, I'm testing for document.createElementNS and document.styleSheets, but it's messy - Safari declares support for both but the DOM 2 CSS doesn't actually work ... IE supports document.styleSheets but it uses a proprietary rule syntax ... Opera 7 doesn't support that but it does support createElementNS.
So instead of testing for support with named-browser exclusions, I thought maybe test for the XML DOM ... but then is it safe to assume that any JS-capable browser which is in the XML DOM supports the required methods?
Or is this all bunk ... should I just be pragmatic and test for Gecko ..?