Closed
Bug 1404646
Opened 7 years ago
Closed 7 years ago
WebExtensions API request reintroduce page-worker API from Jetpack/Addons-SDK
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1318532
People
(Reporter: libreme, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170816210634
Steps to reproduce:
Tried to get title of a given URL page from within the background page.
Attempts were done with iframes and ajax, but no single solution could work consistently for all websites.
They were suggested on https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Comparison_with_the_Add-on_SDK#JavaScript_APIs as a page-worker replacement
Code: https://github.com/LoveIsGrief/links-for-later/blob/links-for-later-4/webextension/index.js#L117
Actual results:
webrequests and webrequestsBlocking had to be used to block or modify certain headers in order to allow CORS.
Depending on the website iframes didn't work (github) or ajax didn't work (reddit) due to primarly 2 reasons:
- CORS not completely blocked
- anti tracking activated and site not loaded (reddit)
I'm sure I'll stumble upon more, but that's what I ran into
Expected results:
It should've been possible to simply get the title without additional rights (webrequests, webrequestsBlocking) or a visible page (tabs, windows).
So either page-workers are needed or invisible tabs (which are page-workers AFAIK).
page-worker API: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-worker
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•