Is it possible to use conditional comments from within a Chrome Frame?

余生长醉 提交于 2019-12-02 02:49:24
Paul Irish

The best way to detect that you're in Chrome Frame inside IE is checking for

var isChromeFrame = !!window.externalHost;

This is only available inside Chrome Frame. Currently there are no conditional comments-like construct for Chrome Frame.

More at http://www.chromium.org/developers/how-tos/chrome-frame-getting-started/understanding-chrome-frame-user-agent.

But to your situation, if the user has Chrome Frame installed already and you're triggering it via a chrome=1 flag, then they'll never see any content inside of IE conditional comments.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!