diff --git a/package-lock.json b/package-lock.json index cdea4a3..fb1e215 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "imjoy-core", - "version": "0.14.4", + "version": "0.14.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b4c3dce..5b39ae6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "imjoy-core", - "version": "0.14.4", + "version": "0.14.5", "private": false, "description": "The core library for ImJoy -- a sandboxed plugin framework for computational web applications.", "author": "imjoy-team ", diff --git a/src/imjoyBasicApp.js b/src/imjoyBasicApp.js index 687adf4..4ff3439 100644 --- a/src/imjoyBasicApp.js +++ b/src/imjoyBasicApp.js @@ -78,6 +78,13 @@ export async function loadImJoyBasicApp(config) { const imjoyCore = await loadImJoyCore(config); const imjoy = new imjoyCore.ImJoy({ imjoy_api, + expose_api: config.expose_api, + client_id: config.client_id, + default_base_frame: config.default_base_frame, + default_rpc_base_url: config.default_rpc_base_url, + debug: config.debug, + flags: config.flags || [], + engine_selector: config.engine_selector, }); await imjoy.start(config); console.log("ImJoy Core started successfully!"); diff --git a/src/imjoyCore.js b/src/imjoyCore.js index 0276a3f..5b2a2c3 100644 --- a/src/imjoyCore.js +++ b/src/imjoyCore.js @@ -21,6 +21,7 @@ export { version as VERSION } from "../package.json"; export class ImJoy { constructor({ + name = "ImJoy", imjoy_api = null, event_bus = null, client_id = null, @@ -32,6 +33,7 @@ export class ImJoy { flags = [], engine_selector = null, }) { + this.name = name; this.config_db = config_db || new PouchDB("imjoy_config", { @@ -100,10 +102,10 @@ export class ImJoy { } // inside an iframe if (this.expose_api && window.self !== window.top) { - const api = await imjoyRPC.setupRPC({ name: "ImJoy" }); + const api = await imjoyRPC.setupRPC({ name: this.name || "ImJoy" }); const root_plugin_config = { _id: "root", - name: "ImJoy", + name: this.name || "ImJoy", type: "window", ui: null, tag: null,