Found a bug while testing PubSub in my extension.
If the iframe of the extension is reloaded, the PubSub listener(s) will stop working.
Listen to a PubSub topic with
Refresh the iframe by right clicking inside it and select “Reload frame”
Now the listener is like “unbound” and won’t trigger when a PubSub message is sent
Using Google Chrome v66.0.3359.170, on Windows 10 build 16299.
Reload the whole page. Reloading the iframe skips/prevents twitch’s supervisor triggering
It’s a won’t fix from twitch [citation missing]
As Barry alluded, PubSub messages are marshalled through another JS layer that sits outside of the extension iframe. When you reload the iframe, that binding is lost/destroyed; i.e. helper isn’t bound to anything.
Why is it a won’t fix?
And reloading the iframe “manually”, isn’t “normal work flow” of an extension. It’s not an action a viewer is gonna do when using an extension “normally”
You might wanna check out the extension rig