angular/packages/common
arturovt 249d0260f9 fix(common): execute checks and remove placeholder when image is already loaded (#55444)
With this commit, we're now able to perform checks even when the image has already
been loaded (e.g., from the browser cache), and its `load` event would never be triggered.
We use the [complete](https://html.spec.whatwg.org/#dom-img-complete) property, as specified,
which indicates that the image state is fully available when the user agent has retrieved all
the image data. This approach effectively triggers checks, as we no longer solely rely on the
`load` event and consider that the image may already be loaded.

This will not remove the placeholder until the `load` event fires (and it won't fire if the
image is already "there").

This prevents memory leaks in development mode, as `load` and `error` event listeners are
still attached to the image element.

PR Close #55444
2024-09-26 14:12:01 -07:00
..
http refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
locales refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
src fix(common): execute checks and remove placeholder when image is already loaded (#55444) 2024-09-26 14:12:01 -07:00
test refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
testing refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
upgrade refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
BUILD.bazel refactor(docs-infra): migrate @angular/docs from dev-infra into adev directory (#57132) 2024-07-30 15:51:26 +00:00
index.ts refactor: update license text to point to angular.dev (#57902) 2024-09-24 15:28:46 +02:00
package.json build: update Node.js to match Angular CLI engines (#56187) 2024-06-03 18:00:46 +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 (#57902) 2024-09-24 15:28:46 +02:00