I am writing a Chrome extension which listens for chrome.webRequest
events, some are set up for blocking, so that I can cancel the request. I need to be able to make a SYNCHRONOUS call from within the chrome.webRequest
callback, which writes to the HTML5 FileSystem. Is there any way to accomplish this synchronously, i.e., so that I have my result of the FileWrite
before I return from the chrome.WebRequest
callback?
Asked
Active
Viewed 63 times
0

Zhedar
- 3,480
- 1
- 21
- 44

Thomas McDermott
- 91
- 6
1 Answers
0
I don't think so.
Some webRequest
calls can be made synchronous, but file operations in FileSystem API are asynchronous and JS can't "wait" for async operations in a blocking manner.

Xan
- 74,770
- 16
- 179
- 206
-
How about using a synchronous PPAPI call from the webRequest callback instead of using the FileSystem API? Would that be possible? If so, how does one implement a synchronous PPAPI call? Is there any other mechanism you could recommend? – Thomas McDermott Dec 10 '14 at 01:06
-
That is outside of my area of expertise, sorry. – Xan Dec 10 '14 at 01:15