angular/packages/platform-browser
Doug Parker d45b7a91f9 fix(platform-browser): remove unused styles when associated host is dropped
This fixes a memory leak in `SharedStylesHost` where calling `removeHost` would leave any `<style>` or `<link>` tags associated with that host in the DOM. This is wasteful in general, and can create even more leaks if the same host is added and removed multiple times, causing styles to be consistently reappended but never removed.

BREAKING CHANGE: This removes styles when they appear to no longer be used by an associated `host`. However other DOM on the page may still be affected by those styles if not leveraging `ViewEncapsulation.Emulated` or if those styles are used by elements outside of Angular, potentially causing other DOM to appear unstyled.
2026-04-06 11:48:14 -07:00
..
animations feat(core): Set default Component changeDetection strategy to OnPush 2026-03-24 16:25:02 -07:00
src fix(platform-browser): remove unused styles when associated host is dropped 2026-04-06 11:48:14 -07:00
test fix(platform-browser): remove unused styles when associated host is dropped 2026-04-06 11:48:14 -07:00
testing build: format md files 2025-11-06 10:03:05 -08:00
BUILD.bazel refactor(platform-browser): remove Hammer integration 2026-03-19 16:13:20 -07: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 minimum supported Node.js versions 2026-02-25 07:57:18 -08:00
PACKAGE.md build: format md files 2025-11-06 10:03:05 -08:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00