In Chapter 8 of the DOM Scripting book I’ve got a little script that looks through the contents of an HTML document, finds any instances of the
abbr element and then constructs a definition list with the information contained within them. Then there’s a section in the chapter called A browser bomb in which I explain how the script needs to be forked because Internet Explorer refuses to recognise the
abbr element—part of a longstanding spat with Netscape. This means not only that you can’t do any scripting on abbreviations, you can’t style them either.
But now it turns out that Internet Explorer has an interesting quirk. If you write:
…suddenly the browser recognises the element and you are free to script and style abbreviations (you don’t even need to append that newly-created element to the document). This applies to any elements that IE doesn’t recognise, which could be very hand in migrating to HTML5.
It doesn’t qualify as an error so I’m not going to add it to the errata but I sure wish I had known about this when I was writing the book.
Posted by Jeremy on Monday, January 28th, 2008 at 6:24pm