@basthon/gui-base 0.71.3 → 0.71.4
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 +1 -1
- package/lib/main.js +9 -5
- package/package.json +5 -5
package/lib/main.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ export declare class GUIBase {
|
|
|
217
217
|
inflate(content: string): Promise<string>;
|
|
218
218
|
/**
|
|
219
219
|
* Handle communication between dynamic iframe and main thread
|
|
220
|
-
* (mainly for auto-resize
|
|
220
|
+
* (mainly for auto-resize). Iframe comes from a display event,
|
|
221
221
|
* like in tutor.
|
|
222
222
|
*/
|
|
223
223
|
handleDynamicIFrame(iframe: HTMLIFrameElement): Promise<void>;
|
package/lib/main.js
CHANGED
|
@@ -538,7 +538,7 @@ Un lien permanant vers le contenu actuel a été créé.
|
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
540
|
* Handle communication between dynamic iframe and main thread
|
|
541
|
-
* (mainly for auto-resize
|
|
541
|
+
* (mainly for auto-resize). Iframe comes from a display event,
|
|
542
542
|
* like in tutor.
|
|
543
543
|
*/
|
|
544
544
|
async handleDynamicIFrame(iframe) {
|
|
@@ -547,10 +547,14 @@ Un lien permanant vers le contenu actuel a été créé.
|
|
|
547
547
|
const data = event.data;
|
|
548
548
|
const type = data?.type;
|
|
549
549
|
switch (type) {
|
|
550
|
-
case "
|
|
551
|
-
const height = data?.content;
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
case "size":
|
|
551
|
+
const { width, height } = data?.content;
|
|
552
|
+
// accepts only numbers since this could
|
|
553
|
+
// become untrusted content in case of corrupted iframe
|
|
554
|
+
if (typeof width == "number")
|
|
555
|
+
iframe.style.width = `${width}px`;
|
|
556
|
+
if (typeof height == "number")
|
|
557
|
+
iframe.style.height = `${height}px`;
|
|
554
558
|
default:
|
|
555
559
|
break;
|
|
556
560
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/gui-base",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.4",
|
|
4
4
|
"description": "Basthon - Base GUI",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"clean": "rm -rf lib/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/checkpoints": "0.71.
|
|
29
|
-
"@basthon/kernel-base": "0.71.
|
|
30
|
-
"@basthon/kernel-loader": "0.71.
|
|
28
|
+
"@basthon/checkpoints": "0.71.4",
|
|
29
|
+
"@basthon/kernel-base": "0.71.4",
|
|
30
|
+
"@basthon/kernel-loader": "0.71.4",
|
|
31
31
|
"js-base64": "^3.7.7",
|
|
32
32
|
"pako": "^2.1.0",
|
|
33
33
|
"promise-delegate": "^1.0.1"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "36867b0590c1f581d69474f333983d2154577a26"
|
|
43
43
|
}
|