Added: 2 years ago
From: GoogleDevelopers
Views: 17,977
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (8)

Sign In or Sign Up now to post a comment!
  • Cool Message Passing.

  • i'm confused

    what about sending messages to and from an injected script ?

    is the content script in the same environment as the injected script  in the site ?

    these videos really need to be updated

  • Secondly, responses are coming back in an asynchronous fashion. Why ? Documents are loaded, content scripts are there. Why it should wait for a callback? It needs control to be returned to exactly the same point where request was sent to content script. Not to a callback function. My background page just needs to know something about open documents. It interrogates content scripts to get this information and than make a decision basis on their responses. Not possible to do in Chrome.

  • Why you guys, did not make this API synchronous ? I could not break my algorithm and wait for response to come back. For example I need to get an answer from content page as a reference to original document object it contains. My main script than going to transform this original document in the way it should. It works as peace of cake in Firefox. In Chrome it is impossible. First of all, content script could not return reference to document (probably because of imaginary security concerns.

  • damn, it isn't so easy

  • That's not a very nice comment - :(

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more