Permalink
Browse files

use a ­ to fix the noScope issue with innerHTML injection. thanks…

  • Loading branch information...
1 parent 77a0042 commit 3897598f20e7b0a6cf4e1aa6e30eb7e99cedc915 @paulirish committed Apr 12, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 matchMedia.js
View
3 matchMedia.js
@@ -21,10 +21,9 @@ window.matchMedia = window.matchMedia || (function(doc, undefined){
return function(q){
- div.innerHTML = '_<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
+ div.innerHTML = '&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
docElem.insertBefore(fakeBody, refNode);
- div.removeChild(div.firstChild);
bool = div.offsetWidth == 42;
docElem.removeChild(fakeBody);

1 comment on commit 3897598

@paulirish
Owner

that's ryan SEDDON, folks.

>_>

whoops.

Please sign in to comment.