Open jvh2 opened 3 months ago
This issue has been automatically marked as stale because of no recent activity. It will be closed in 10 weeks if no further activity occurs. Thank you for your contributions.
Tech Refinement As suggested the kirby-avatar should be extended with an onerror handler for the img within the avatar.
The native error handling is described here
As written in the error handling section of img elements in the mdn-site, there are multiple causes that may trigger the onerror. In that regard we intend to emit the full ErrorEvent since the consumer of this may need different information based on the cause of the error.
The event will be distributed through an EventEmitter<ErrorEvent>
attribute: imgError
which may be set on the kirby-avatar component to receive a callback when the img src returns an invalid image.
Describe the enhancement
Kirby avatar component should handle broken link for attribute [imageSrc] with an error handle event
Describe the solution you'd like
Kirby avatar component is expanded with a onerror event handler to handle broken links in [imageSrc]. Therefor we would like the kirby avatar component to be expanded with an error event handler.
Have you considered any alternatives?
Are there any additional context?
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Refinement
Implementation
The contributor who wants to implement this issue should:
Review
Once the issue has been implemented and is ready for review: