aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/controls.js
diff options
context:
space:
mode:
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);