mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 09:06:16 -08:00
优化插件模块
This commit is contained in:
1 parent
98f0e80a33
commit
47058616de
3 files changed
+14
-4
No files matched your search
@@ -4217,7 +4217,10 @@
|
||||
pluginName = "plugin".concat(this.id);
|
||||
}
|
||||
|
||||
this[pluginName] = result;
|
||||
errorHandle(!hasOwnProperty(this, pluginName), "Cannot add a plugin that already has the same name: ".concat(pluginName));
|
||||
Object.defineProperty(this, pluginName, {
|
||||
value: result
|
||||
});
|
||||
this.art.emit('plugin:add', plugin);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user