ohctechv3/.svn/pristine/a0/a024db7c213accf36bc7f22467e6675c7c0a95a8.svn-base
2024-10-28 15:03:36 +05:30

18 lines
512 B
Plaintext

/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
function removeEventListener(node, eventName, handler, options) {
var capture = options && typeof options !== 'boolean' ? options.capture : options;
node.removeEventListener(eventName, handler, capture);
if (handler.__once) {
node.removeEventListener(eventName, handler.__once, capture);
}
}
export default removeEventListener;