Skip to content

Emit "load" and "error" events on loading #31

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

Closed
vgavro opened this issue Nov 30, 2018 · 1 comment
Closed

Emit "load" and "error" events on loading #31

vgavro opened this issue Nov 30, 2018 · 1 comment

Comments

@vgavro
Copy link
Contributor

vgavro commented Nov 30, 2018

For usage like this:

<template>
<script2 src="myscript.js" @load="loaded" />
<template>
<script>
export default {
   methods: {
       loaded () {
          window.myscriptModule.youVeGotTheIdea()
       }
   }
}
</script>

fixes with #29

taoeffect added a commit that referenced this issue Jun 26, 2019
+ Better handling of simultaneously loaded components ([#12](#12) - thanks **[@vgavro](https://github.com/vgavro)**)
+ Emit vue events for `loaded` and `error` ([#31](#31) - thanks **[@vgavro](https://github.com/vgavro)**)
+ Updated all dev dependencies and switched from uglify to terser
@taoeffect
Copy link
Owner

Note: the load event was renamed to loaded. Available in 2.1.0!

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

No branches or pull requests

2 participants