angular/packages/zone.js/lib/browser
arturovt 4ea70e36b9 fix(zone.js): swallow the error when the element callback is not patchable (#45400)
The `patchCallbacks` is used for patching the `document.registerElement` and
`customElements.define`. We explicitly wrap the patching code into try-catch since
callbacks may be already patched by other web components frameworks (e.g. LWC), and they
make those properties non-writable. This means that patching callback will throw an error
`cannot assign to read-only property`. See this code as an example:
https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186
We don't want to stop the application rendering if we couldn't patch some
callback, e.g. `attributeChangedCallback`.

PR Close #42546

PR Close #45400
2022-03-25 16:31:09 -07:00
..
api-util.ts refactor(zone.js): remove onProp eventNames array to reduce the bundle size (#40962) 2022-03-01 18:41:15 +00:00
browser-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser-util.ts fix(zone.js): swallow the error when the element callback is not patchable (#45400) 2022-03-25 16:31:09 -07:00
browser.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00
canvas.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
custom-elements.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
define-property.ts fix(zone.js): defineProperties should also set symbol props (#45098) 2022-03-03 12:22:05 -08:00
event-target-legacy.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00
event-target.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00
message-port.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
property-descriptor-legacy.ts refactor(zone.js): for legacy browser, still use hard coding eventNames (#40962) 2022-03-01 18:41:15 +00:00
property-descriptor.ts refactor(zone.js): remove onProp eventNames array to reduce the bundle size (#40962) 2022-03-01 18:41:15 +00:00
register-element.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-common.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadydom.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00
webapis-media-query.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-notification.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-resize-observer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-rtc-peer-connection.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00
webapis-user-media.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
websocket.ts fix(zone.js): should continue to executue listeners when throw error (#41562) 2021-04-21 15:54:08 -07:00