element.addEventListener("click", handler1);
element.addEventListener("click", handler2);Observable API / notebook
Observable API
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
document.body
.when("mousedown")
.filter((e) => e.target.matches("body"))
.map((e) => ({ x: e.clientX, y: e.clientY }))
.subscribe((p) => {
console.log(`${p.x},${p.y}`);
});