internet-explorerhtml-components

Is there a recommended feature detection idiom for oldIE .htc HTML Components?


We have a link to an old site that uses these, and don't want to offer it unless the user is on an oldIE version that still supports them. Currently we're sniffing useragent, but that's obviously a bad idea.


Solution

  • !!document.body.addBehavior
    

    seems to do the trick, but I'll leave this question open for a few days in case anyone knows a better way.

    Note: avoid jQuery's $.isFunction() and the like here; it's not reliable for native methods in IE.