src/main/javascript/dom/floatz.dom.dom.js
/**
     * Add event listener.
     *
     * @param element Element
     * @param {string|Event|CustomEvent} event Event name or event
     * @param handler Event handler
     * @param capture true for capture phase, false for bubbling phase
     */
Add event listener.
@param element Element
@param {string|Event|CustomEvent} event Event name or event
@param handler Event handler
@param capture true for capture phase, false for bubbling phase
Add event listener . @param element Element @param { string|Event|CustomEvent } event Event name or event @param handler Event handler @param capture true for capture phase false for bubbling phase
static addEvent(element, event, handler, capture = false) {
        let eventName = event instanceof Event ? event.type : event;
        if (element.addEventListener) {
            element.addEventListener(eventName, handler, capture);
        } else if (element.attachEvent) {
            element.attachEvent(eventName, handler);
        }
    }
static addEvent ( element , event , handler , capture = false ) { let eventName = event instanceof Event ? event . type : event ; if ( element . addEventListener ) { element . addEventListener ( eventName , handler , capture ) ; } else if ( element . attachEvent ) { element . attachEvent ( eventName , handler ) ; } }
Add event listener.
Add event listener .
// console.debug(LOG_PREFIX + "Adding event " + eventName);