wiselinks
wiselinks copied to clipboard
Vanilla JS detection of document ready / "page:always" event
Problem
I'm using Vue.js on the frontend and slowly replacing all parts of the app with it. But our backend Rails app is currently using Wiselinks. There is no way for me to hook into the page:always
event from pure JS as jQuery events are not detectable with document.addEventListener('page:always')
as (for some reason) they use a separate event system (see https://bugs.jquery.com/ticket/11047)
Any chance the library can be updated to send standard vanilla JS events in addition to jQuery trigger()
?
Edit: I'd happily contribute a PR for this as well, basically replacing $(document).trigger
with a triggerEvent()
function that does both