From c64b8f69403b0287f55f25dc533b41cb8d34075d Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Tue, 14 Nov 2017 17:27:40 +0100 Subject: Started on error handling, Safari icon fix --- src/js/controls.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/js/controls.js') 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 to icon.appendChild(use); -- cgit v1.2.3