Published
Edited
Oct 9, 2022
Importers
2 stars
Insert cell
Insert cell
Insert cell
getQueryParam = (name) => new URL(window.location).searchParams.get(name)
Insert cell
getQueryParam("something")
Insert cell
setQueryParam = (name, value) => {
const url = new URL(document.baseURI);
url.searchParams.set(name, value);
// doesn't work :(((
history.replaceState({}, "", url.toString());
}
Insert cell
Insert cell
Insert cell
Insert cell
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