Permalink
Browse files

elem-details now included in modernizr

  • Loading branch information...
mirisuzanne committed Mar 14, 2012
1 parent c6faa4b commit 1d1a1fac560f7b51ada14d36126bc60045c47c5d
Showing with 0 additions and 21 deletions.
  1. +0 −21 content/media/js/elem-details.js
@@ -1,21 +0,0 @@
-// By @mathias, based on http://mths.be/axh
-Modernizr.addTest('details', function() {
- var doc = document,
- el = doc.createElement('details'),
- de = doc.documentElement,
- fake,
- root = doc.body || (function() {
- fake = true;
- return de.insertBefore(doc.createElement('body'), de.firstElementChild || de.firstChild);
- }()),
- diff;
- el.innerHTML = '<summary>a</summary>b';
- el.style.display = 'block';
- root.appendChild(el);
- diff = el.offsetHeight;
- el.open = true;
- diff = diff != el.offsetHeight;
- root.removeChild(el);
- fake && root.parentNode.removeChild(root);
- return diff;
-});

0 comments on commit 1d1a1fa

Please sign in to comment.