Permalink
Browse files

No commit message

  • Loading branch information...
1 parent d666ba4 commit 8594104a3f7cdaf9abb74c3cb4b51112f9d888c8 Scott Jehl committed Jan 19, 2011
Showing with 6 additions and 8 deletions.
  1. +6 −8 matchMedia.js
View
@@ -29,14 +29,12 @@ if ( !(window.matchMedia) ){
cssrule = '@media '+q+' { #ejs-qtest { position: absolute; } }';
//must set type for IE!
styleBlock.type = "text/css";
- if (styleBlock.styleSheet){
- styleBlock.styleSheet.cssText = cssrule;
- // IE8 does not seem to support the styleSheet property nor appendChild with style elements:
- } else if (styleBlock.canHaveHTML === false){
- styleBlock.text = cssrule;
- } else {
- styleBlock.appendChild(doc.createTextNode(cssrule));
- }
+ if (styleBlock.styleSheet){
+ styleBlock.styleSheet.cssText = cssrule;
+ }
+ else {
+ styleBlock.appendChild(doc.createTextNode(cssrule));
+ }
docElem.insertBefore(fakeBody, docElem.firstChild);
docElem.insertBefore(styleBlock, docElem.firstChild);
cache[q] = ((window.getComputedStyle ? window.getComputedStyle(testDiv,null) : testDiv.currentStyle)['position'] == 'absolute');

0 comments on commit 8594104

Please sign in to comment.