A bug report for maphilight lead to me becoming aware of a fascinating quirk in IE. A quirk in which IE holds to published standards with fanatical zeal, contrary to everything one might have come to expect, and far in excess of Firefox/Opera/Safari.
When you use the
.innerHTML property to add an element to the DOM, IE will fire an “unknown runtime error” if that element is incorrectly nested. So trying to place a
(as was the case in the bug report) will error very unhelpfully.
Anyway, this led to the release of maphilight 1.1.1. (Which also includes an official minified version of the file, for convenience’s sake.)
Considering all the Standards based bugs in IE, and their issues with .innerHTML in general
see related bugs here:
Although the warning is nice, most developers won’t encounter this (if they are coding properly to begin with).
That said, good to hear that IE is doing something right!
It’s definitely a very niche bug to encounter. I didn’t even find it myself; a user reported it, and I had to work out why it was happening.
This is the problem with releasing jQuery plugins that can be applied to any image anywhere; it’s hard to test all the combinations.
Leave a comment