More IE Woes – This Time, from the Inside
June 22, 2006 7:01 pm C/C++, Internet Explorer, Programming, Tools and Libraries, Web and Web StandardsWow. I haven’t had such mixed feelings about IE in years.
On the one hand, MSHTML – the COM component that implements IE – is actually pretty awesome. I’ve been able to roll applications using it in hours that would normally have taken weeks. It’s an impressive feat of engineering, and though I disagree with some design decisions, the usability of the embeddable component is actually pretty spectacular, if you’re familiar with COM. In particular, the res:// protocol strikes me as borderline brilliant; binary behaviors are awesome; extensible tags have a lot of untapped potential; BHOs would be great except there are too many spamming scum abusing them.
On the other hand, there are problems. There’s one outright boneheaded mistake, and the documentation is sadly lacking.
- The OnNavigate sound – that click you hear when you get a link – cannot be suppressed. I’m not joking – by design, IE refuses to let you get rid of it. Their suggestions are to override the user’s global IE preferences, shut off sound, or to hide the browser before you follow any click and then re-show it after the click. Given how much Microsoft blabbed about how this should be usable as a transparent control, it leaves me flabbergasted that they haven’t fixed this until IE7 with FEATURE_DISABLE_NAVIGATION_SOUNDS. Just amazing.
- Update: I found a way. MSDN is wrong about this; it is indeed fixable.
- This bit about being unable to touch innerHTML on several tag types (notably table and tbody, where it’s hella useful) pisses me off, but since I can work through DOM, it’s annoying rather than important.
- One of the particularly wootastic things MS did was to generate an interface called IDocHostUIHandler by which one can inject new functions into JS’ purview through the DOM and window.external , allowing you to effectively provide new interfaces just by implementing a COM object with the automation interfaces in IDispatch. Of course, I can’t find a complete example in pure-c++ without ATL, WTL, MFC or some other ignorant wrapper nonsense to save my life, so I’m pretty stuck. I have a mostly-complete implementation, but when I try to install it, window.external turns to null, suggesting a flaw. Of course, all the error handling is in window.external, where I can’t get at it, so your guess is as good as mine about what’s actually going on.
With some extra documentation and if they hadn’t been such tards about that clicking noise, MSHTML would be a much more wonderful playground than it actually is. (I’m pretty sure there is in fact a way to disable those noises – several commercial applications do it just fine – but MSDN insists it’s unpossible, which suggests it’s probably some undocumented interface somewhere. Hell.)

August 23rd, 2006 at 6:08 pm
[...] Back in post #141, More IE Woes, I documented several problems. One was that MSDN claims this noise cannot be suppressed. Indeed, by design, IE6 refuses to allow you to suppress that sound (god knows why.) That MSDN article goes as far as to tell you to override the user’s sound preferences to turn the noise off. How badbear is that? Anyway, IE7 finally has an interface to turn that off, called FEATURE_DISABLE_NAVIGATION_SOUNDS. However, people like me who are reluctant to make their applications non-functional without IE7 will not like that answer. [...]