Title: Zone.js should patch EventEmitter.prototype.off · Issue #35473 · angular/angular · GitHub
Open Graph Title: Zone.js should patch EventEmitter.prototype.off · Issue #35473 · angular/angular
X Title: Zone.js should patch EventEmitter.prototype.off · Issue #35473 · angular/angular
Description: Affected Package The issue is caused by package zone.js Is this a regression? Not to my knowledge. Description When running in Node, and with patching enabled (the default), Zone does not completely patch EventEmitter. Zone patches Event...
Open Graph Description: Affected Package The issue is caused by package zone.js Is this a regression? Not to my knowledge. Description When running in Node, and with patching enabled (the default), Zone does not completel...
X Description: Affected Package The issue is caused by package zone.js Is this a regression? Not to my knowledge. Description When running in Node, and with patching enabled (the default), Zone does not completel...
Opengraph URL: https://github.com/angular/angular/issues/35473
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Zone.js should patch EventEmitter.prototype.off","articleBody":"### Affected Package\r\nThe issue is caused by package zone.js\r\n\r\n### Is this a regression?\r\nNot to my knowledge.\r\n\r\n### Description\r\n\r\nWhen running in Node, and with patching enabled (the default), Zone does not completely patch `EventEmitter`.\r\n\r\nZone patches `EventEmitter.prototype.on` just like it patches `EventEmitter.prototoype.addListener` because `on` is an alias for `addListener`.\r\n\r\nHowever, though `off` is an alias for `removeListener` (added in Node 10.0.0), Zone patches `EventEmitter.prototoype.removeListener` but fails to patch `EventEmitter.prototype.off`.\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nClone this repo: https://github.com/lddubeau/zone-bug1-should-patch-off\r\n\r\nThen run:\r\n\r\n```\r\nnpm install\r\nnode index.js\r\n```\r\n\r\n### Expected Output\r\n\r\n> handler got prior to off\r\n\r\n### Actual Output\r\n\r\n> handler got prior to off\r\n> handler got after off\r\n\r\n### Discussion\r\n\r\nThe after ``off`` is called to remove the handler, the handler is still there. If the ``patch`` variable is set to true to execute the ``if`` branch, then we get the expected results.\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:** I'm just using Zone.js\r\n**Zone.js version:** 0.10.2\r\n**Node.js version:** 12.15.0","author":{"url":"https://github.com/lddubeau","@type":"Person","name":"lddubeau"},"datePublished":"2020-02-15T19:46:25Z","url":"https://github.com/angular/angular/issues/35473"}
| 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:32cfa479-f0f6-0631-1ba0-50c495727d51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1BE:2F9718:1ADAAC7:23FCE90:6B0165D3 |
| html-safe-nonce | ea5fba3de1c3f498b83c032d773d8e5fccffd4b5a5bee93260637c2650fe66a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUJFOjJGOTcxODoxQURBQUM3OjIzRkNFOTA6NkIwMTY1RDMiLCJ2aXNpdG9yX2lkIjoiMjg1OTMyNDYzMTcxNjgxNjMzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 11b92fd19f5bb58bbcd7de5066ea5837d35396c9f1a035b841e09af710648262 |
| hovercard-subject-tag | issue:565799564 |
| 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/35473/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b6f6bfb14e3d50f769d130192a9050d16b753be52ad7c97bc85c5ad47f242d1/angular/angular/issues/35473 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b6f6bfb14e3d50f769d130192a9050d16b753be52ad7c97bc85c5ad47f242d1/angular/angular/issues/35473 |
| og:image:alt | Affected Package The issue is caused by package zone.js Is this a regression? Not to my knowledge. Description When running in Node, and with patching enabled (the default), Zone does not completel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lddubeau |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width