Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

[extension API] messaging flow #143

Closed
@paulirish

Description

@paulirish
Member

https://developer.chrome.com/extensions/devtools has great overview of communicating between the various pieces, but it's still a little incomplete.

One tricky area is passing messages from a contentscript back into a devtools panel.

There's no direct connectivity between the page being inspected and DevTools extension panels -- we usually recommend this flow: DOM messaging from the injected inspected page code to the content script, then extension messaging to send that to the background page and the front-end iframe.

Example: polymer extension message passing via CustomEvent on the window

another option is: buffering events in inspected page and polling them

Activity

changed the title [-]devtools extension API messaging flow[/-] [+][extension API] messaging flow[/+] on Jan 6, 2015
paulirish

paulirish commented on Jan 6, 2015

@paulirish
MemberAuthor

covered in real docs thanks to thomas boyt's patch
https://codereview.chromium.org/632793002

zikaari

zikaari commented on Oct 24, 2018

@zikaari

Thought I'd share a wrapper I made few months ago: crx-bridge

Comes with ES6 Promises and multiplexed long-lived connections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @paulirish@zikaari

        Issue actions

          [extension API] messaging flow · Issue #143 · GoogleChrome/devtools-docs