aboutsummaryrefslogtreecommitdiffstats
path: root/src/wait_element.ts
diff options
context:
space:
mode:
authorTeddy Wing2020-05-08 17:55:31 +0200
committerTeddy Wing2020-05-08 17:55:31 +0200
commita8d66ecf78147b2056ffec7e270369852501bf9e (patch)
treea4562556335179bcfebcfdb892677c1e3547facf /src/wait_element.ts
parentfa02ff6374f715c9f754ce28401c8a81846ca52a (diff)
downloadnetflix-immersive-a8d66ecf78147b2056ffec7e270369852501bf9e.tar.bz2
watch_credits: Fix shadowed `controls` variable
Silly me, the `controls` module was getting shadowed by the `controls` variable in `init_mutation_observer()`, which contained the DOM element. That's why the controls weren't getting hidden. Now that we're no longer shadowing the variable, the controls do get properly hidden.
Diffstat (limited to 'src/wait_element.ts')
-rw-r--r--src/wait_element.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wait_element.ts b/src/wait_element.ts
index f24b891..cd1bb1d 100644
--- a/src/wait_element.ts
+++ b/src/wait_element.ts
@@ -1,3 +1,6 @@
+import logger from './logger';
+
+
export default function wait_element (selector: string): Promise<Element> {
return new Promise(function(resolve) {
const interval = setInterval(
@@ -5,6 +8,8 @@ export default function wait_element (selector: string): Promise<Element> {
const element = document.querySelector(selector);
if (element) {
+ logger.debug('wait_element():', 'found', element);
+
clearInterval(interval);
resolve(element);