Set download URL via setter

This commit is contained in:
Sam Potts
2019-04-12 19:00:17 +10:00
parent e281078441
commit cdacae6697
4 changed files with 20 additions and 7 deletions

6
src/js/controls.js vendored
View File

@ -1244,8 +1244,8 @@ const controls = {
controls.focusFirstMenuItem.call(this, target, tabFocus);
},
// Set the download link
setDownloadLink() {
// Set the download URL
setDownloadUrl() {
const button = this.elements.buttons.download;
// Bail if no button
@ -1253,7 +1253,7 @@ const controls = {
return;
}
// Set download link
// Set attribute
button.setAttribute('href', this.download);
},