Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: emit native <img> events #416

Merged
merged 6 commits into from
Oct 8, 2021
Merged

feat: emit native <img> events #416

merged 6 commits into from
Oct 8, 2021

Conversation

hansds
Copy link
Contributor

@hansds hansds commented Sep 14, 2021

nuxt-image now emits the onLoad event from the contained image

@shadow81627
Copy link
Contributor

Use $listeners to allow binding to all native events. https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components

@hansds
Copy link
Contributor Author

hansds commented Sep 14, 2021

Use $listeners to allow binding to all native events. https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components

Thanks for the suggestion! I updated the PR.

@shadow81627
Copy link
Contributor

It would be nice to have a test for the on load event. The docs and playground could also be updated to include the onload event.

@hansds
Copy link
Contributor Author

hansds commented Sep 23, 2021

Hey @pi0 and @shadow81627 - I fixed your suggestions. Added docs, playground, nuxt-picture and an e2e test.
For the e2e test I wasn't too sure what the best approach was, I opted for verifying a console message, but maybe there's a better way?

@hansds hansds requested a review from pi0 October 7, 2021 12:37
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pi0 pi0 changed the title feat: emit on image load event for nuxt-img feat: emit native <img> events Oct 8, 2021
@pi0 pi0 merged commit f22ae01 into nuxt:main Oct 8, 2021
@provok-me
Copy link

@pi0 Do you know when you will release those changes?

@madsh93
Copy link

madsh93 commented Dec 1, 2021

@pi0 When will this be released? Docs are live, but @load is still not working on latest version.

@evangelinepapanicola
Copy link

@load still doesn't seem to work with nuxt-picture in the latest version. According to the docs this should work - might be worth updating them as it is misleading.

@baptistebriel
Copy link

Would be great to have @load event on <nuxt-picture> 👍🏻

procrates pushed a commit to procrates/nuxt-image that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants