How to Properly Detect <details> Support
Between version 10.0.603 and 12.0.701 Google Chrome had partial support for the <details>
carelessly leaving its rendering for later.
Mathias Bynens created a feature test which was too convoluted for my liking.
So I've made some research and found a shorter method which use what-I-am-calling correlated feature detection.
if(!("open"in document.createElement("details"))||window.chrome&&window.google&&google.gears) {fallback()}
In the very unlikely edge case that you have installed Gears on Chrome 12+ you would be served the javascript polyfill instead.
As a matter of fact Google plans to provide offline support to Gmail using HTML5 this summer which will probably coincide with the first stable release to natively support the <details>
element.
About this entry
You’re currently reading “How to Properly Detect <details> Support”, an entry on Marc’s Digital Life.
- Published:
- 06/06/2011 1:18 pm
- Tags:
- javascript, cross-browser, html5 and google
No Comments
Jump to comment form | Comments rss