@basthon/gui-base 0.73.1 → 0.73.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/main.d.ts +6 -0
- package/lib/main.js +13 -0
- package/package.json +5 -5
package/lib/main.d.ts
CHANGED
|
@@ -221,4 +221,10 @@ export declare class GUIBase {
|
|
|
221
221
|
* like in tutor.
|
|
222
222
|
*/
|
|
223
223
|
handleDynamicIFrame(iframe: HTMLIFrameElement): Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Handle communication between iframe and kernel
|
|
226
|
+
* (e.g. matplotlib). Iframe comes from a display event,
|
|
227
|
+
* like in matplotlib.
|
|
228
|
+
*/
|
|
229
|
+
handleKernelIFrame(iframe: HTMLIFrameElement, port: MessagePort): Promise<void>;
|
|
224
230
|
}
|
package/lib/main.js
CHANGED
|
@@ -574,6 +574,19 @@ Un lien permanant vers le contenu actuel a été créé.
|
|
|
574
574
|
}, { root: document.documentElement });
|
|
575
575
|
observer.observe(iframe);
|
|
576
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Handle communication between iframe and kernel
|
|
579
|
+
* (e.g. matplotlib). Iframe comes from a display event,
|
|
580
|
+
* like in matplotlib.
|
|
581
|
+
*/
|
|
582
|
+
async handleKernelIFrame(iframe, port) {
|
|
583
|
+
// wait for iframe to be ready
|
|
584
|
+
await new Promise((resolve, reject) => {
|
|
585
|
+
iframe.onload = () => resolve();
|
|
586
|
+
iframe.onerror = reject;
|
|
587
|
+
});
|
|
588
|
+
iframe.contentWindow.postMessage(port, "*", [port]);
|
|
589
|
+
}
|
|
577
590
|
}
|
|
578
591
|
/**
|
|
579
592
|
* Copy a text to clipboard.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/gui-base",
|
|
3
|
-
"version": "0.73.
|
|
3
|
+
"version": "0.73.3",
|
|
4
4
|
"description": "Basthon - Base GUI",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"clean": "rimraf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/checkpoints": "0.73.
|
|
29
|
-
"@basthon/kernel-base": "0.73.
|
|
30
|
-
"@basthon/kernel-loader": "0.73.
|
|
28
|
+
"@basthon/checkpoints": "0.73.3",
|
|
29
|
+
"@basthon/kernel-base": "0.73.3",
|
|
30
|
+
"@basthon/kernel-loader": "0.73.3",
|
|
31
31
|
"js-base64": "^3.7.7",
|
|
32
32
|
"pako": "^2.1.0",
|
|
33
33
|
"promise-delegate": "^1.0.1"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "68894e4db137b9cd8ec8676a2ed9c76752120a8f"
|
|
44
44
|
}
|