Reputation: 18429
I'm using the chrome.experimental.webRequest.onBeforeRequest
callback where I need to find the URL of the tab making the request before returning from onBeforeRequest
.
This would usually be the referring URL in the HTTP request but I also want the URL where there is no referrer sent such as HTTPS to HTTP requests.
The only thing I found was chrome.tabs.get
which is asynchronous.
What would be the best approach to get the tab URL before returning?
I have two ideas on solving this:
ManualResetEvent
, though this answer says it is not possible.Upvotes: 2
Views: 427
Reputation: 1172
I can't think of any good answer to this, except the local structure you offered, and perhaps also using Web Workers, but that seems like an overkill, even if possible.
Upvotes: 1