In my article about method closures I showed a way to neatly create a portable reference to an object method that doesn’t ‘forget’ the object it belongs to. I have since discovered an aggravating problem on – you’ll never guess – Internet Explorer!
Explorer throws an unknown error when you set innerHTML
The bug seems to only occur for certain markup. I’m not 100% sure what the defining problem is, except that markup containing block elements like
<p> seem to invoke the error. Anyway, this drove me up the wall recently so I thought I’d share the work around I came up with.