We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
:loaded
1 parent 7895785 commit cfd0be8Copy full SHA for cfd0be8
src/base/plugin/events.js
@@ -10,7 +10,7 @@ wrap(() => {
10
function mod(plugin) {
11
const obj = {
12
...eventManager,
13
- on(event, fn) {
+ on(event = '', fn) {
14
if (typeof fn !== 'function') throw new Error('Must pass a function');
15
16
function pluginListener(...args) {
@@ -29,6 +29,10 @@ wrap(() => {
29
}
30
pluginListener.plugin = plugin;
31
32
+ if (event.split(' ').includes(':loaded')) {
33
+ plugin.logger.warn('Event manager: `:loaded` is deprecated, ask author to update to `:preload`!');
34
+ }
35
+
36
eventManager.on.call(obj, event, pluginListener);
37
},
38
emit(...args) {
0 commit comments