Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
18 lines
512 B
Plaintext
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; |