Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ example ⟩ link going nowhere
replit ⟩ , require ⟩
// ⭐️ import import { $ } from './js/ext/Node_ext.js'; // Node extension // <a>.onclick $('a').addEventListener("click", event => { console.log("Nope."); event.preventDefault(); // ⭐️ prevent (link's) default action });
Eloquent JS ⟩ ⟩ ⭐️
JS.info ⟩
Event ⟩
the return value of an event handler is related to canceling the default actions.