observablehq / inspector

The Observable standard inspector.
ISC License
143 stars 20 forks source link

fix crash in hasSelection #187

Closed mbostock closed 3 months ago

mbostock commented 3 months ago

Fixes some bogus code in #41 that perhaps never worked — it was dependent on nonstandard extensions to the Node interface that appear to be specific to Chrome devtools. So instead we use the standard methods (which probably behave slightly differently with respect to shadow roots, but I don’t think this matters to us — and at any rate if it’s better than crashing).

mbostock commented 3 months ago

Merging optimistically but review welcome.

Fil commented 3 months ago

I haven't been able to replicate the crash. But reading the description this seems correct.