Skip to content

Commit

Permalink
Performance improvement. detect API implementation first (extreme imp…
Browse files Browse the repository at this point in the history
…ortant for old IEs)
  • Loading branch information
Alexander Farkas committed Aug 11, 2011
1 parent 7fcf7b5 commit e8a67be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions feature-detects/elem-details.js
@@ -1,8 +1,13 @@
// By @mathias, based on http://mths.be/axh
Modernizr.addTest('details', function() {
var doc = document,
el = doc.createElement('details'),
de = doc.documentElement,
el = doc.createElement('details');
//test fast API implementation
if( !('open' in el) ){
return false;
}
//interface implemented, detected UI implementation
var de = doc.documentElement,
fake,
root = doc.body || (function() {
fake = true;
Expand Down

0 comments on commit e8a67be

Please sign in to comment.