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 …

Posted at 06/06/2011 1:18 pm | No Comments | Filed Under: , , and read on

test

test

Posted at 19/04/2011 3:26 pm | 1 Comment | Filed Under: read on

Monthly Archives

Tags