Giter VIP home page Giter VIP logo

Comments (10)

cadorn avatar cadorn commented on August 24, 2024

$feature firephp/firephp-for-firebug.next#1

from devtools-extension-examples.

cadorn avatar cadorn commented on August 24, 2024

I suppose I cannot reference the DOM due to inter-process boundary, but how do I post and receive messages between the panel DOM and the panel JS?

from devtools-extension-examples.

cadorn avatar cadorn commented on August 24, 2024

self.port does not work

from devtools-extension-examples.

janodvarko avatar janodvarko commented on August 24, 2024

If the panel's iframe uses type="content", which is the recommended way, you need to use message manager to send messages between the chrome scope and the iframe.

A good example of how to send these message is in the Add-on SDK.
post-repl:

Honza

from devtools-extension-examples.

cadorn avatar cadorn commented on August 24, 2024

This does not seem to work. I am not trying to start a debug session. When I use this and call this.debuggee.start() I get a remote actor protocol message in the panel. I am simply trying to message with the content in the panel. Any change someone can add an example. I'll add skeleton if you give me access to this repo.

from devtools-extension-examples.

cadorn avatar cadorn commented on August 24, 2024

JS: https://github.com/firephp/firephp-for-firebug.next/blob/f47b4c3d2358d905c7b5d0a670fbc02e72b64d56/components/ui/devtools-panel.js#L25-L36

HTML: https://github.com/firephp/firephp-for-firebug.next/blob/f47b4c3d2358d905c7b5d0a670fbc02e72b64d56/client/data/panel.html#L8-L21

from devtools-extension-examples.

janodvarko avatar janodvarko commented on August 24, 2024

Here is an example:
https://github.com/firebug/devtools-extension-examples/tree/master/MessageManager

Honza

from devtools-extension-examples.

janodvarko avatar janodvarko commented on August 24, 2024

You should have an access to this repo now.

Honza

from devtools-extension-examples.

cadorn avatar cadorn commented on August 24, 2024

Thanks! This is way more than I could have figured out. These little examples are key to the success of extensions. As soon as each example has an automated test we should run these against SDK changes.

from devtools-extension-examples.

janodvarko avatar janodvarko commented on August 24, 2024

Yes, the tests are needed.

Honza

from devtools-extension-examples.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.