-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Hey mate,
First of all, what a genius plugin!!!
I'm trying to get rid of a bunch of my js files with Surreal. How would I do me().on("multipleevents?"), like click and keydown (Esc) at the same time? For example, how would I achieve something like this but keep the locality of behaviour effect?
<button id="cancelBtnDrawerForm"/>const cancelBtnDrawerForm = document.getElementById('cancelBtnDrawerForm')
const cancelDrawerForm = () => {
form.classList.remove('show')
bodyWrapper.classList.remove('scaled')
body.classList.remove('scaled')
setTimeout(() => {
form.style.display = 'none'
backdrop.style.display = 'none'
}, 200)
}
cancelBtnDrawerForm.addEventListener('click', cancelDrawerForm)
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
cancelDrawerForm();
}
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels