aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-02-09 10:36:32 +0000
committerSam Potts <sam@potts.es>2020-02-09 10:36:32 +0000
commit74ba6a96fc5df9654766ac21593d5c8274d98fb2 (patch)
treeb562cd8063109cfdff34deb1e669ab042de4aaa3
parent59e3ef7248e8e151fecc32add5c1746705bc3aae (diff)
downloadplyr-74ba6a96fc5df9654766ac21593d5c8274d98fb2.tar.lz
plyr-74ba6a96fc5df9654766ac21593d5c8274d98fb2.tar.xz
plyr-74ba6a96fc5df9654766ac21593d5c8274d98fb2.zip
Set download attribute for HTML5 only
-rw-r--r--src/js/controls.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/controls.js b/src/js/controls.js
index f93cb8a3..1cce51f6 100644
--- a/src/js/controls.js
+++ b/src/js/controls.js
@@ -1578,9 +1578,13 @@ const controls = {
element: 'a',
href: this.download,
target: '_blank',
- download: '',
});
+ // Set download attribute for HTML5 only
+ if (this.isHTML5) {
+ attributes.download = '';
+ }
+
const { download } = this.config.urls;
if (!is.url(download) && this.isEmbed) {