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.58k stars 126 forks source link

Custom inspectors #51

Open mbostock opened 1 year ago

mbostock commented 1 year 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 8 months ago

related to #23 #1120

mbostock commented 8 months ago

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

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