You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
This library is what I was looking exactly for, thank you for creating it! The API is exactly what I want. But there's one problem... It doesn't work with Vue 2.x.
It doesn't work loaded directly using <script> and it doesn't work in webpack build when imported.
EDIT1: Upon further investigation of $events.listeners it seems like the listeners aren't registered at all because I can't see my 'test' event listener there.
EDIT2: Yep. The problems lies in registering event listeners in events property. See updated fiddle: https://jsfiddle.net/egjru2wq/3/
EDIT3: I think I've pinpointed the issue. I think the mixin is incorrectly installed. First of all the plugin installation method isn't exposed in install method (Writing a Plugin) and the second main thing is that mixin is registered on init (index.js:18) instead of beforeCreate (Migration from Vue 1.x - init renamed). — I'd create pull request myself but I don't have any experience in plugins that are backward compatible with Vue 1.x.
Hello @steffans!
This library is what I was looking exactly for, thank you for creating it! The API is exactly what I want. But there's one problem... It doesn't work with Vue 2.x.
It doesn't work loaded directly using
<script>
and it doesn't work in webpack build when imported.Fiddle: https://jsfiddle.net/egjru2wq/2/
EDIT1: Upon further investigation of
$events.listeners
it seems like the listeners aren't registered at all because I can't see my 'test' event listener there.EDIT2: Yep. The problems lies in registering event listeners in
events
property. See updated fiddle: https://jsfiddle.net/egjru2wq/3/EDIT3: I think I've pinpointed the issue. I think the mixin is incorrectly installed. First of all the plugin installation method isn't exposed in install method (Writing a Plugin) and the second main thing is that mixin is registered on
init
(index.js:18) instead ofbeforeCreate
(Migration from Vue 1.x - init renamed). — I'd create pull request myself but I don't have any experience in plugins that are backward compatible with Vue 1.x.EDIT4: For reference - here's my modified dist/vue-event-manager.common.js that I'm now using (and it works!) with Vue 2.x: https://hastebin.com/qivukanoka.js
The text was updated successfully, but these errors were encountered: