mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
7600bec71d
In this commit, setting `window.history.scrollRestoration` is wrapped in a try-catch block to prevent `SecurityError` exceptions in restricted contexts such as: - sandboxed iframes - partially navigated or inactive windows - test runners, extensions, or content previews If an error occurs, a runtime warning with error code [2400] is logged to the console. This avoids breaking app initialization and improves cross-browser safety. Unfortunately, it's not possible to perform any end-to-end testing of this fix. PR Close #62186
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT