web-monetization-projects icon indicating copy to clipboard operation
web-monetization-projects copied to clipboard

FF not removing handler.html from background page

Open sublimator opened this issue 4 years ago • 3 comments

image

sublimator avatar Oct 16 '20 03:10 sublimator

Can reproduce by logging out, then navigating to coil.com and refreshing

sublimator avatar Oct 22 '20 08:10 sublimator

"load" event on the iframe does not seem to be firing

https://github.com/coilhq/web-monetization-projects/blob/acdba6106cee9f6bae8272f6bd7fb4acde754e73/packages/coil-extension/src/background/services/SiteToken.ts#L23-L31

sublimator avatar Oct 22 '20 08:10 sublimator

It seems that there are some Web Extensions implementation differences to Chrome:

  1. The content script does not run in the coil.com/handler.html iframe injected into the background page
  2. Upon extension reload: FF runs all the content scripts in all open tabs

Per 1, getting the auth token via injecting the handler.html page won't work on FF

sublimator avatar Oct 22 '20 09:10 sublimator