JSON View and DOM panel are rendering JS/DOM types using set of components called Reps. devtools/client/shared/components/reps There should be a way for extensions to register a new rep that renders custom data types like e.g. those coming from custom JS libraries (e.g. one for jQuery object etc.) Honza
We should take a look at chrome's "custom formatters" API here https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview and see how that relates to reps. It's a way for framework authors to define custom outputters for objects by setting a window.devtoolsFormatters object, like https://github.com/andrewdavey/immutable-devtools.
Thanks for the link! Yes, this is very interesting, it's been around at least for about a year (here is the doc I have mentioned at our meeting: https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/edit#heading=h.xuvxhsd2bp05) and it looks like getting more and more attention. An existing application of custom formatters: https://github.com/binaryage/dirac Honza
Adding user story. Note that I'm requesting we log a message to the console with something like: "Custom Log formatter registered" such that our users are aware of DevTools using the formatters. I think it will be helpful when you're looking at the production site which accidentally shipped with the formatters and when you thought you included the formatters but actually didn't.
User Story: (updated)
Component: Developer Tools: Framework → Developer Tools: Shared Components
Discussed in Github too https://github.com/devtools-html/devtools-core/issues/392
This would also be useful for clojurescript development.
You need to log in before you can comment on or make changes to this bug.