On Wed, Apr 6, 2011 at 6:05 PM, Nathan Sweet <[email protected]> wrote: > Diego, > Do you mind if I convert your response into a comment on my blog? Thanks for > your feedback. >
Sure use it at your discretion, spread the voice ;-) I thought some of these traps could help others see why these old browsers should be dismissed asap for the benefit of the community. You may have a look at the Feature Testing section of http://github.com/dperini/nwmatcher/src/nwmatcher.js for references over these bugs, it will be a better source than my limited embedded memory :=) -- Diego > On Wed, Apr 6, 2011 at 7:21 AM, Diego Perini <[email protected]> wrote: >> >> Nathan, >> good collection of informations about native DOM API. It would be >> great to have some site work as a repository for all these known bugs. >> >> There are more bugs in getElementById and getElementsByTagName (on IE >> normally). There are so many bugs that I can hardly remember them all. >> >> >> Known problems with id/name and "getElementById / getElementsByName": >> >> - id/name conflicts, as you explained, but with more repercussions >> the worst problem being with forms elements but not only there >> >> - an element with id="length" will shadow all DOM length properties >> <div id="length"></div> document.getElementsByTagName('div').length; // >> boom >> >> - any leaked global variable is a potential clash with element having >> id with the same name >> <div id="max"></div> max = document.getElementById('max'); // boom >> >> >> Known problems with "getElementsByTagName": >> >> - universal selector "*" not supported on IE < 9, returns text nodes >> >> - wrong results with universal selector when context is an <object> >> element >> <object ... ><param name="loop" value="y"><param name="movie" >> src="a.swf"></object> >> object.getElementsByTagName('*') // 0 elements found >> using object.childNodes can help with this in some circumstance >> >> - html5 elements are not recognized properly, needs html5 shim >> document.getElementsByTagName("abbr") will return two items >> for each element found, one being <abbr> and the other being </abbr> >> closing tag is being interpreted as a different element >> >> In conclusion, if you can, avoid using IE < 9 ;-) >> >> -- >> Diego >> >> >> On Wed, Apr 6, 2011 at 2:03 AM, nathanJsweet <[email protected]> >> wrote: >> > I wouldn't normally try to use this mailing list to shamelessly >> > promote something, but I'm doing this to ask any new-comers to >> > JavaScript and those advanced in their years, to consider my newly >> > newly launched blog, which can be found at "nathansweet.me". Any >> > feedback or interest you might show would be greatly appreciated. >> > >> > -- >> > To view archived discussions from the original JSMentors Mailman list: >> > http://www.mail-archive.com/[email protected]/ >> > >> > To search via a non-Google archive, visit here: >> > http://www.mail-archive.com/[email protected]/ >> > >> > To unsubscribe from this group, send email to >> > [email protected] >> > >> >> -- >> To view archived discussions from the original JSMentors Mailman list: >> http://www.mail-archive.com/[email protected]/ >> >> To search via a non-Google archive, visit here: >> http://www.mail-archive.com/[email protected]/ >> >> To unsubscribe from this group, send email to >> [email protected] > > > > -- > Nathan Sweet > Web Developer > 206.588.6137 > nathansweet.me > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
