summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/audio-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-07 21:23:42 -0400
committerGitHub <noreply@github.com>2020-10-07 21:23:42 -0400
commit05e51a950e3fb7da3f9a252a742c068a9daad6b2 (patch)
tree0649a711633648c379adb79ca4b8344d8da001d7 /ext/bg/js/settings/audio-controller.js
parentcb1902eaddeb092bf1e3d78f9e601109bd32202c (diff)
Settings templates refactor (#897)
* Add template instantiation API to SettingsController * Use SettingsController.instantiateTemplate
Diffstat (limited to 'ext/bg/js/settings/audio-controller.js')
-rw-r--r--ext/bg/js/settings/audio-controller.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/bg/js/settings/audio-controller.js b/ext/bg/js/settings/audio-controller.js
index bd7951f7..6ea11e15 100644
--- a/ext/bg/js/settings/audio-controller.js
+++ b/ext/bg/js/settings/audio-controller.js
@@ -136,12 +136,6 @@ class AudioController {
}
}
- _instantiateTemplate(templateSelector) {
- const template = document.querySelector(templateSelector);
- const content = document.importNode(template.content, true);
- return content.firstChild;
- }
-
_getUnusedAudioSource() {
const audioSourcesAvailable = [
'jpod101',
@@ -159,7 +153,7 @@ class AudioController {
_createAudioSourceEntry(value) {
const eventListeners = new EventListenerCollection();
- const container = this._instantiateTemplate('#audio-source-template');
+ const container = this._settingsController.instantiateTemplate('audio-source');
const select = container.querySelector('.audio-source-select');
const removeButton = container.querySelector('.audio-source-remove');