Topsy turvy

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

inside a

(as was the case in the bug report) will error very unhelpfully.

Surprising behavior.

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.)

Join the Conversation

2 Comments

  1. Considering all the Standards based bugs in IE, and their issues with .innerHTML in general

    see related bugs here:
    http://webbugtrack.blogspot.co

    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!

  2. 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

Your email address will not be published. Required fields are marked *