Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Message passing to extensions from webpages #408

Open
Justineo opened this issue Feb 4, 2016 · 0 comments
Open

Message passing to extensions from webpages #408

Justineo opened this issue Feb 4, 2016 · 0 comments
Assignees

Comments

@Justineo
Copy link

Justineo commented Feb 4, 2016

The docs on Dev.Opera says:

From the web page, use the runtime.sendMessage or runtime.connect APIs to send a message to a specific app or extension. For example:

// The ID of the extension we want to talk to
var editorExtensionId = '<sample extension id>';

// Make a simple request
chrome.runtime.sendMessage(editorExtensionId, { openUrlInEditor: url },
  function(response) {
      if (!response.success) {
          handleError(url);
      }
  }
);

But in Opera chrome.runtime is actually undefined so the method provided by the doc is not working. I don't know if the doc here is still correct.

F.Y.I. I'm using Opera v35.0.2066.37 on OS X.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants