Created
September 7, 2015 10:01
-
-
Save AntonTrollback/134d8ba149f7bad10906 to your computer and use it in GitHub Desktop.
Fix Safari issue where svg <use> might not display in unless forced to rerender at page load
This file contains hidden or 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
var els = document.getElementsByTagName('use'); | |
Array.prototype.forEach.call(els, function(el) { | |
el.setAttribute('xlink:href', el.getAttribute('xlink:href')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment