abort-polyfill
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -43,5 +43,10 @@ /** | ||
const handlers = getHandlers(this) | ||
const handler = handlers.get(name) | ||
if (handler) { | ||
this.removeEventListener(name, handler) | ||
} | ||
if (typeof value === 'function') { | ||
handlers.set(name, value) | ||
this.addEventListener(name, value) | ||
const newHandler = value.bind(this) | ||
handlers.set(name, newHandler) | ||
this.addEventListener(name, newHandler) | ||
} else { | ||
@@ -48,0 +53,0 @@ handlers.set(name, null) |
{ | ||
"name": "abort-polyfill", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Polyfill AbortController and AbortSignal", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5097
115