diff options
author | Sam Potts <sam@potts.es> | 2018-10-24 22:30:41 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-10-24 22:30:41 +1100 |
commit | c232eb2478f16ed913de6eced7ed18d03ca7a1fb (patch) | |
tree | 44be2e59e7e2180903026424bbf7fb193da72a75 /src/js/controls.js | |
parent | fac134dd955fe1a264a68897cd49d06a5afd9750 (diff) | |
download | plyr-c232eb2478f16ed913de6eced7ed18d03ca7a1fb.tar.lz plyr-c232eb2478f16ed913de6eced7ed18d03ca7a1fb.tar.xz plyr-c232eb2478f16ed913de6eced7ed18d03ca7a1fb.zip |
Fix SVG issue for older browsers (fixes #1191)
Diffstat (limited to 'src/js/controls.js')
-rw-r--r-- | src/js/controls.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/js/controls.js b/src/js/controls.js index 785f100d..efc45e8a 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -111,10 +111,11 @@ const controls = { // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href if ('href' in use) { use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path); - } else { - use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); } + // Always set the older attribute even though it's "deprecated" (it'll be around for ages) + use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path); + // Add <use> to <svg> icon.appendChild(use); |