observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.23k stars 95 forks source link

Custom inspectors #51

Open mbostock opened 9 months ago

mbostock commented 9 months ago

Symbol.for("observablehq.display")? Ref. https://docs.deno.com/runtime/manual/tools/jupyter#rich-content-output, but in our case it should return an HTML element/node for insertion, rather than a string, since we’re running in the client and we don’t need serializable values.

Fil commented 4 months ago

related to #23 #1120

mbostock commented 4 months ago

For precedent there is also Symbol.for("nodejs.util.inspect.custom").

Another approach would be to register custom inspectors in the config.