newspeaklanguage / newspeak

Newspeak is a live object-capability language in the Smalltalk tradition
https://newspeaklanguage.org/
Other
132 stars 11 forks source link

Add custom view for DOM nodes #87

Open gbracha opened 3 years ago

gbracha commented 3 years ago

In the case of aliens that are DOM nodes, we should be able to display them as HTML. Is there an HTML pretty printer exposed in the browser?

Miciurash commented 2 years ago

@gbracha what do you mean by "HTML pretty printer"?

gbracha commented 2 years ago

@Miciurash I mean a facility for displaying HTML with syntax highlighting or formatting beyond the raw text. Maybe by accessing dev tools? Though we'd want something portable. Otherwise, this would be pretty straightforward, just get the nodes outerhtml and show it in a CodeMirrorFragment. To do this, one needs tounderstand how we do custom object views in ObjectPresenters; we have such views for documents, lists, strings, numbers etc.

gbracha commented 2 years ago

The most basic thing would be to print out their outerhtml