FoozleTimer class is wired with a
BroadcastChannel instance, yet when the
emit() method is called, the
postMessage() method is not available. This throws an error:
Uncaught TypeError: this.channel.postMessage is not a function
emit() method is called from the
startTimer() method, which uses an arrow function so the
this context should be respected from the
FoozleTimer class. However, this does not appear to be the case.
It is possible that the context of the
BroadcastChannel instance is not being retained correctly.
To resolve this issue, further debugging is needed to confirm the source of the issue. Some potential solutions might be:
- Ensuring the context of the
BroadcastChannelinstance is set correctly in the constructor of
- Re-initializing the
BroadcastChannelinstance within the