IMPR: events router

This commit is contained in:
Tony Air 2020-09-10 06:57:16 +07:00
parent 5e4067818a
commit 268044c6bf
1 changed files with 3 additions and 2 deletions

View File

@ -16,17 +16,18 @@ const EventsUI = (($) => {
class EventsUI { class EventsUI {
static process(el, args) { static process(el, args) {
let modEl = el;
const eventName = args[0]; const eventName = args[0];
const tagName = typeof el !== undefined ? $(el).prop('tagName') : null; const tagName = typeof el !== undefined ? $(el).prop('tagName') : null;
switch (tagName) { switch (tagName) {
case 'HTML': case 'HTML':
case 'BODY': case 'BODY':
el = $W; modEl = $W;
break; break;
} }
return [el, args]; return [modEl, args];
} }
} }