You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
According to the DOM spec, the second removeEventListener should do nothing. However, with zone.js loaded it produces the following error message:
Error: Task does not support cancellation, or is already canceled.
at ZoneDelegate.cancelTask (/usr/local/google/home/sjelin/zone.js/test/browser_entry_point.ts:382:24)
at Zone.cancelTask (/usr/local/google/home/sjelin/zone.js/test/browser_entry_point.ts:292:45)
at zoneAwareRemoveEventListener (/usr/local/google/home/sjelin/zone.js/test/browser_entry_point.ts:970:25)
at HTMLBodyElement.removeEventListener (eval at createNamedFn (/usr/local/google/home/sjelin/zone.js/test/browser_entry_point.ts:1051:18), <anonymous>:3:46)
at Object.<anonymous> (/usr/local/google/home/sjelin/zone.js/test/browser_entry_point.ts:2354:19)
Basically, the problem is that the patched removeEventListener will cancel the task, but never removes it from the list of registered tasks. So when the second removeEventListener happens it tries to cancel the task again, leading to the problem. I suggest we start removing it from the list of registered tasks, unless there is a reason it has to stay there.
Consider the following code snippet:
According to the DOM spec, the second
removeEventListenershould do nothing. However, withzone.jsloaded it produces the following error message:Basically, the problem is that the patched
removeEventListenerwill cancel the task, but never removes it from the list of registered tasks. So when the secondremoveEventListenerhappens it tries to cancel the task again, leading to the problem. I suggest we start removing it from the list of registered tasks, unless there is a reason it has to stay there.