Published
Edited
Nov 9, 2019
Importers
Insert cell
md`# d3-selection/src/selectAll.js`
Insert cell
Insert cell
{
debugger;
return selectAll("h1");
}
Insert cell
document.querySelectorAll("h1") // not as detailed as in debugger tool
Insert cell


selectAll = function(selector) {
// debugger;
return typeof selector === "string"
? new Selection([document.querySelectorAll(selector)], [document.documentElement])
: new Selection([selector == null ? [] : selector], root);
}
Insert cell
import {Selection, root} from "@embracelife/d3-selection-01";
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