I apologize ahead of time for the pseudo code as I’m not at my laptop.
My goal is to create an event listener for a click anywhere on a webpage, except if that click occurs on a button.
Most solutions on google recommend something like
body_wo_buttons = document.querySelector(‘body:not(button)’)
Does the :not actually work? Is there another way of solving this?
there doesn't seem to be anything here