Title: [zonejs] An exception in event handler breaks execution of remaining handlers · Issue #41522 · angular/angular · GitHub
Open Graph Title: [zonejs] An exception in event handler breaks execution of remaining handlers · Issue #41522 · angular/angular
X Title: [zonejs] An exception in event handler breaks execution of remaining handlers · Issue #41522 · angular/angular
Description: 🐞 bug report Affected Package The issue is caused by package @angular/zone.js. Is this a regression? AFAICT, it has always been like this. Description W3C event handlers are supposed to be called regardless if one of them throws an excep...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular/zone.js. Is this a regression? AFAICT, it has always been like this. Description W3C event handlers are supposed to be called r...
X Description: 🐞 bug report Affected Package The issue is caused by package @angular/zone.js. Is this a regression? AFAICT, it has always been like this. Description W3C event handlers are supposed to be called r...
Opengraph URL: https://github.com/angular/angular/issues/41522
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[zonejs] An exception in event handler breaks execution of remaining handlers","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by package @angular/zone.js.\r\n\r\n\r\n### Is this a regression?\r\nAFAICT, it has always been like this.\r\n\r\n\r\n### Description\r\nW3C event handlers are supposed to be called regardless if one of them throws an exception.\r\nHowever when global callback handling is used (default), if any of the registered event handlers result in an unhandled exception, execution of all remaining handlers is aborted. This represents a significant and hard-to-detect breakage in event handling just from loading ZoneJS.\r\n\r\nhttps://github.com/angular/angular/blob/51bb922a081a1059929cb549ffbc3cf1d1366e2a/packages/zone.js/lib/common/events.ts#L150-L155\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\nWhen run w/o ZoneJS, clicking the button prints both `click 1` and `click 2`.\r\nWhen run with ZoneJS loaded, only `click 1` is printed.\r\n\r\n```javascript\r\n(function() {\r\n const btn = document.body.appendChild(document.createElement('button'));\r\n btn.textContent = 'Click me';\r\n\r\n btn.addEventListener('click', () => {\r\n console.log('click 1');\r\n throw new Error();\r\n });\r\n\r\n btn.addEventListener('click', () => {\r\n console.log('click 2');\r\n });\r\n})()\r\n```","author":{"url":"https://github.com/mleibman","@type":"Person","name":"mleibman"},"datePublished":"2021-04-08T21:24:23Z","url":"https://github.com/angular/angular/issues/41522"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:679127b7-2281-0093-713b-16e747ce3b79 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B93C:11EACE:C899C2:10CB09E:6B00FBFD |
| html-safe-nonce | d02e7705ac0630277db6b0e9a3d98ec7e7ee183d52f1dc007c5f3c184cf52ba4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTNDOjExRUFDRTpDODk5QzI6MTBDQjA5RTo2QjAwRkJGRCIsInZpc2l0b3JfaWQiOiIyOTkzNjg3NTk0MDM1OTAzNDg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8df5dba49f649aa0241c21ea18778472fb50b088d9d0724d21ffd9eb1ddd237e |
| hovercard-subject-tag | issue:853933930 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/41522/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ebfcd9fc20d20a3ba98f0527e5639a6cab345f435faba86d8586b8eac95b1600/angular/angular/issues/41522 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ebfcd9fc20d20a3ba98f0527e5639a6cab345f435faba86d8586b8eac95b1600/angular/angular/issues/41522 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular/zone.js. Is this a regression? AFAICT, it has always been like this. Description W3C event handlers are supposed to be called r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mleibman |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width