Skip to content

Commit 5db2595

Browse files
committed
support loadPlugin getPlugin
1 parent 535113b commit 5db2595

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

index.html

+14
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@
334334
Object.assign(this, imjoy_api);
335335
this.getWindow = this.getWindowOveride;
336336
this.createWindow = this.createWindowOveride;
337+
this.loadPlugin = this.loadPluginOveride;
338+
this.getPlugin = this.getPluginOveride;
337339
}
338340

339341
async getWindowOveride(config) {
@@ -348,6 +350,18 @@
348350
return windowWrapper;
349351
}
350352

353+
async loadPluginOveride(config) {
354+
const plugin = await this.imjoy_api.loadPlugin(config);
355+
const pluginWrapper = new PluginWrapper(plugin);
356+
return pluginWrapper;
357+
}
358+
359+
async getPluginOveride(config) {
360+
const plugin = await this.imjoy_api.getPlugin(config);
361+
const pluginWrapper = new PluginWrapper(plugin);
362+
return pluginWrapper;
363+
}
364+
351365
async restart() {
352366
await restart();
353367
}

0 commit comments

Comments
 (0)