mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
feat(img): add ionImgWillLoad event and emit ionImgDidLoad when image is loaded (#18159)
- Adds `ionImgWillLoad` event that emits when the img src is set - Moves the `ionImgDidLoad` event emit so that it happens when the image actually finishes loading fixes #17652 closes #18161
This commit is contained in:

committed by
Brandy Carney

parent
0e4726b62a
commit
38ffb98421
6
core/src/components.d.ts
vendored
6
core/src/components.d.ts
vendored
@ -1551,10 +1551,14 @@ export namespace Components {
|
||||
*/
|
||||
'onIonError'?: (event: CustomEvent<void>) => void;
|
||||
/**
|
||||
* Emitted when the img src has been set
|
||||
* Emitted when the image has finished loading
|
||||
*/
|
||||
'onIonImgDidLoad'?: (event: CustomEvent<void>) => void;
|
||||
/**
|
||||
* Emitted when the img src has been set
|
||||
*/
|
||||
'onIonImgWillLoad'?: (event: CustomEvent<void>) => void;
|
||||
/**
|
||||
* The image URL. This attribute is mandatory for the <img> element.
|
||||
*/
|
||||
'src'?: string;
|
||||
|
Reference in New Issue
Block a user