angular/packages/common
arturovt 7600bec71d fix(router): handle scrollRestoration error in restricted environments (#62186)
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
2025-06-24 12:24:43 +00:00
..
http build: migrate to using new jasmine_test (#62086) 2025-06-18 08:27:26 +02:00
locales build: update common's locales to use rules_js (#61629) 2025-05-26 10:18:14 +00:00
src fix(router): handle scrollRestoration error in restricted environments (#62186) 2025-06-24 12:24:43 +00:00
test build: migrate to using new jasmine_test (#62086) 2025-06-18 08:27:26 +02:00
testing build: migrate common to use rules_js based toolchain (#61433) 2025-05-20 15:07:56 +00:00
upgrade build: migrate to using new jasmine_test (#62086) 2025-06-18 08:27:26 +02:00
BUILD.bazel build: replace all ng_package with new rule from rules_angular (#61843) 2025-06-04 09:13:41 +00:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json build: update common's locales to use rules_js (#61629) 2025-05-26 10:18:14 +00:00
PACKAGE.md docs: add api doc to sub-packages (#33801) 2019-11-20 14:48:50 -08:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00