link going nowhere

browsereventdefault action ⟩ example ⟩ link going nowhere

// ⭐️ 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
});

Last updated