Saturday 15 June 2013

javascript - Comunicating synchronously with a chrome extension -



javascript - Comunicating synchronously with a chrome extension -

i'm looking way send , receive message synchronously chrome extension. thought phone call function defined in extension traditional web page (web app) in synchronous way d'ont have wait before receiving result.

unfortunately, read synchronous message passing in chrome extensions? , https://code.google.com/p/chromium/issues/detail?id=135095. both it's not possible.

but thought xmlhttprequest can create synchronous call.

i know not possible i'm asking anyway.. there way utilize xmlhttprequest object in such way comunicate synchronously extension ?

regards,

i'm sorry you, reply still no. don't see why using xmlhttprequests help create kind of operation done (asynchronously) chrome api, let's assume you've got content_script.js runs within page, , need send message background.js. how accomplish using xmlhttprequest? making request background.js not give chance run code, read it. that's because of api methods used in background.js aren't available in content script. that's same other asynchronous operation happens within chrome extension.

so problem here chrome extensions cannot utilize xmlhttprequests communicate within environment, thus, can't utilize them in way.

javascript google-chrome-extension synchronous message-passing

No comments:

Post a Comment