Tiny href click handler library.
var nanohref =// Handler automatically attached to window.document// Create DOM nodevar el = documentelelinnerText = 'Click me'documentbody// Trigger clickel// => "new location is /my-link"
By default all href links are handled. The event is not handled under the following conditions:
.preventDefault()called on it
:warn: Note that we only handle
target=_blank if they also have
rel="noopener noreferrer" on them. This is needed to properly sandbox web
more widespread, we can drop
noreferrer too (currently just 60% of browsers in use support it).
Create a new anchor click handler. The second argument is for the root node,
which defaults to