aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/controls.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2017-11-14 17:27:40 +0100
committerSam Potts <sam@potts.es>2017-11-14 17:27:40 +0100
commitc64b8f69403b0287f55f25dc533b41cb8d34075d (patch)
tree7f7212c63d7d52d9bd086ebdb21353ff8e2c3c39 /src/js/controls.js
parent022b436c3f51d6a1a9bdf29ff9d34325389ecc82 (diff)
downloadplyr-c64b8f69403b0287f55f25dc533b41cb8d34075d.tar.lz
plyr-c64b8f69403b0287f55f25dc533b41cb8d34075d.tar.xz
plyr-c64b8f69403b0287f55f25dc533b41cb8d34075d.zip
Started on error handling, Safari icon fix
Diffstat (limited to 'src/js/controls.js')
-rw-r--r--src/js/controls.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/js/controls.js b/src/js/controls.js
index 748d848c..022fab0d 100644
--- a/src/js/controls.js
+++ b/src/js/controls.js
@@ -75,14 +75,11 @@ const controls = {
const use = document.createElementNS(namespace, 'use');
const path = `${iconPath}-${type}`;
- // If the new `href` attribute is supported, use that
+ // Set `href` attributes
// https://github.com/sampotts/plyr/issues/460
// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href
- if ('href' in use) {
- use.setAttribute('href', path);
- } else {
- use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path);
- }
+ use.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path);
+ use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', path);
// Add <use> to <svg>
icon.appendChild(use);