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

Expose component metadata in dev builds #2190

Open
tricki opened this issue Feb 8, 2020 · 1 comment
Open

Expose component metadata in dev builds #2190

tricki opened this issue Feb 8, 2020 · 1 comment
Labels

Comments

@tricki
Copy link
Contributor

tricki commented Feb 8, 2020

Stencil version:

 @stencil/core@1.9.0-15 

I'm submitting a:

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
In development builds Stencil exposes data about the vdom of an element with the window.stencil.inspect method. But the data doesn't include all metadata (state variables, watchers, listeners etc.).

Expected behavior:
The full metadata of Stencil components is exposed.
It looks like the getHostRef function used in the inspect method includes this metadata (in the $cmpMeta$ property) and could be added to the global stencil object.

Steps to reproduce:
n/a

Related code:

stencil.getHostRef = getHostRef;

Other information:
There might already be a way to access this information (preferably without having to run the dev server) in which case this issue can be closed.
There is a similar issue (#1542) which would only expose the data in a separate file.
My goal is to update the Stencil Inspector Chrome Extension since it uses window.devInspector which is no longer available.

@ionitron-bot ionitron-bot bot added the triage label Feb 8, 2020
@tricki
Copy link
Contributor Author

tricki commented Feb 25, 2021

Here's an example output of getHostRef:

https://gist.github.com/tricki/245f66fbfbe8f6b2d9faf8b2f9b399fd

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

No branches or pull requests

1 participant