Whether an element is — or contains — a chart drawn by Observable Plot.
Plot stamps every chart with a generated plot-<hash> class, which is the
cheapest reliable signal and the one used here. The class is also what
scopes Plot's own stylesheet, so a chart without it would not render
correctly in the first place.
Parameters
element: Element
The element to test.
Returns boolean
True when the element is a Plot <svg> or a <figure> around one.
Whether an element is — or contains — a chart drawn by Observable Plot.
Plot stamps every chart with a generated
plot-<hash>class, which is the cheapest reliable signal and the one used here. The class is also what scopes Plot's own stylesheet, so a chart without it would not render correctly in the first place.