Public
Edited
Feb 17
Insert cell
Insert cell
DOMParser = import('https://esm.sh/@xmldom/xmldom').then(m => m.DOMParser)
Insert cell
JSDOM = import('https://esm.sh/jsdom').then(m => m.JSDOM)
Insert cell
XPathParser = import('https://esm.sh/xpath-ts')
Insert cell
{
const DOMParser = new JSDOM().window.DOMParser
const dom = new DOMParser().parseFromString(fixture, 'text/html')
const query = XPathParser.parse('//div')
return query.select({ node: dom, isHtml: true })
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more