Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokamak dev tools #242

Open
MaxDesiatov opened this issue Aug 3, 2020 · 2 comments
Open

Tokamak dev tools #242

MaxDesiatov opened this issue Aug 3, 2020 · 2 comments
Labels
API design API design and prototyping is needed enhancement New feature or request

Comments

@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Aug 3, 2020

I imagine this could work similarly to React dev tools. Just evaluating the mounted components tree and matching those to rendered DOM elements would already be useful.

I didn't look into the details of how React dev tools do it, but in our case it probably could be implemented by importing a callback or an object into the WebAssembly module, or agreeing on a certain symbol being available when the dev tools extension is present. The renderer could check for that symbol and expose the mounted element tree through it. Alternative approaches are obviously welcome.

@MaxDesiatov MaxDesiatov added enhancement New feature or request API design API design and prototyping is needed labels Aug 3, 2020
@carson-katri
Copy link
Member

I've got an inspector Chrome extension partially working. It builds a Set of the MountedViews (and some related data), then encodes it to JSON and passes it to the extension. Then the extension uses id and parent properties to construct a tree from the data.

Screen Shot 2020-08-05 at 11 04 18 PM

The extension is also written in Tokamak 🙃

@MaxDesiatov MaxDesiatov pinned this issue Aug 20, 2020
@aehlke
Copy link

aehlke commented Sep 13, 2023

Is the extension shared somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API design API design and prototyping is needed enhancement New feature or request
Development

No branches or pull requests

3 participants