Last active
February 16, 2017 19:12
-
-
Save nemisj/d03bd6f62c0d4f0925db to your computer and use it in GitHub Desktop.
Conditional comments for IE in react.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renderHead() { | |
return ( | |
var comment = '<!--[if lte IE 9]><script src="/public/media.match.js"></script><![endif]-->'; | |
<head> | |
<title>Website title</title> | |
<meta name="react-comment-hack" | |
dangerouslySetInnerHTML={{__html: comment}}> | |
</meta> | |
</head> | |
); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I wanted to try this snippet but got
Invariant Violation: meta is a void element tag and must neither have
childrennor use
dangerouslySetInnerHTML``Don't you have the same ?