pxt-core 8.4.3 → 8.4.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/built/pxt.js +15 -4
- package/built/pxtrunner.d.ts +1 -0
- package/built/pxtrunner.js +2 -1
- package/built/pxtsim.d.ts +1 -0
- package/built/pxtsim.js +15 -4
- package/built/target.js +1 -1
- package/built/web/multiplayer/css/main.1b9969ea.css +4 -0
- package/built/web/multiplayer/js/main.9f7f3192.js +2 -0
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtrunner.js +1 -1
- package/built/web/pxtsim.js +1 -1
- package/package.json +1 -1
- package/webapp/public/multiplayer.html +1 -1
- package/webapp/public/run.html +13 -2
- package/built/web/multiplayer/css/main.2dd69ed8.css +0 -4
- package/built/web/multiplayer/js/main.f3b8f930.js +0 -2
package/built/pxt.js
CHANGED
|
@@ -154567,8 +154567,8 @@ var pxsim;
|
|
|
154567
154567
|
if (parentWindow) {
|
|
154568
154568
|
// if message comes from parent already, don't echo
|
|
154569
154569
|
if (source !== parentWindow) {
|
|
154570
|
-
|
|
154571
|
-
parentWindow.postMessage(msg,
|
|
154570
|
+
// posting sim messages to parent frame; no origin restriction.
|
|
154571
|
+
parentWindow.postMessage(msg, "*");
|
|
154572
154572
|
}
|
|
154573
154573
|
}
|
|
154574
154574
|
if (!this.options.nestedEditorSim && !(broadcastmsg === null || broadcastmsg === void 0 ? void 0 : broadcastmsg.toParentIFrameOnly)) {
|
|
@@ -154659,7 +154659,7 @@ var pxsim;
|
|
|
154659
154659
|
}
|
|
154660
154660
|
}
|
|
154661
154661
|
createFrame(url) {
|
|
154662
|
-
var _a, _b;
|
|
154662
|
+
var _a, _b, _c;
|
|
154663
154663
|
const wrapper = document.createElement("div");
|
|
154664
154664
|
wrapper.className = `simframe ui embed`;
|
|
154665
154665
|
const frame = document.createElement('iframe');
|
|
@@ -154675,12 +154675,23 @@ var pxsim;
|
|
|
154675
154675
|
urlObject.searchParams.append("hideSimButtons", "1");
|
|
154676
154676
|
furl = urlObject.toString();
|
|
154677
154677
|
}
|
|
154678
|
+
if ((_b = this._runOptions) === null || _b === void 0 ? void 0 : _b.queryParameters) {
|
|
154679
|
+
const urlObject = new URL(furl);
|
|
154680
|
+
const parameters = this._runOptions.queryParameters.split("&");
|
|
154681
|
+
for (const param of parameters) {
|
|
154682
|
+
const [a, b] = param.split(/[:=]/);
|
|
154683
|
+
if (a && b) {
|
|
154684
|
+
urlObject.searchParams.set(a, b);
|
|
154685
|
+
}
|
|
154686
|
+
}
|
|
154687
|
+
furl = urlObject.toString();
|
|
154688
|
+
}
|
|
154678
154689
|
furl += '#' + frame.id;
|
|
154679
154690
|
frame.src = furl;
|
|
154680
154691
|
frame.frameBorder = "0";
|
|
154681
154692
|
frame.dataset['runid'] = this.runId;
|
|
154682
154693
|
frame.dataset['origin'] = new URL(furl).origin || "*";
|
|
154683
|
-
if ((
|
|
154694
|
+
if ((_c = this._runOptions) === null || _c === void 0 ? void 0 : _c.autofocus)
|
|
154684
154695
|
frame.setAttribute("autofocus", "true");
|
|
154685
154696
|
wrapper.appendChild(frame);
|
|
154686
154697
|
const i = document.createElement("i");
|
package/built/pxtrunner.d.ts
CHANGED
package/built/pxtrunner.js
CHANGED
|
@@ -1764,7 +1764,8 @@ var pxt;
|
|
|
1764
1764
|
light: simOptions.light,
|
|
1765
1765
|
single: simOptions.single,
|
|
1766
1766
|
hideSimButtons: simOptions.hideSimButtons,
|
|
1767
|
-
autofocus: simOptions.autofocus
|
|
1767
|
+
autofocus: simOptions.autofocus,
|
|
1768
|
+
queryParameters: simOptions.additionalQueryParameters,
|
|
1768
1769
|
};
|
|
1769
1770
|
if (pxt.appTarget.simulator && !simOptions.fullScreen)
|
|
1770
1771
|
runOptions.aspectRatio = parts.length && pxt.appTarget.simulator.partsAspectRatio
|
package/built/pxtsim.d.ts
CHANGED
package/built/pxtsim.js
CHANGED
|
@@ -6223,8 +6223,8 @@ var pxsim;
|
|
|
6223
6223
|
if (parentWindow) {
|
|
6224
6224
|
// if message comes from parent already, don't echo
|
|
6225
6225
|
if (source !== parentWindow) {
|
|
6226
|
-
|
|
6227
|
-
parentWindow.postMessage(msg,
|
|
6226
|
+
// posting sim messages to parent frame; no origin restriction.
|
|
6227
|
+
parentWindow.postMessage(msg, "*");
|
|
6228
6228
|
}
|
|
6229
6229
|
}
|
|
6230
6230
|
if (!this.options.nestedEditorSim && !(broadcastmsg === null || broadcastmsg === void 0 ? void 0 : broadcastmsg.toParentIFrameOnly)) {
|
|
@@ -6315,7 +6315,7 @@ var pxsim;
|
|
|
6315
6315
|
}
|
|
6316
6316
|
}
|
|
6317
6317
|
createFrame(url) {
|
|
6318
|
-
var _a, _b;
|
|
6318
|
+
var _a, _b, _c;
|
|
6319
6319
|
const wrapper = document.createElement("div");
|
|
6320
6320
|
wrapper.className = `simframe ui embed`;
|
|
6321
6321
|
const frame = document.createElement('iframe');
|
|
@@ -6331,12 +6331,23 @@ var pxsim;
|
|
|
6331
6331
|
urlObject.searchParams.append("hideSimButtons", "1");
|
|
6332
6332
|
furl = urlObject.toString();
|
|
6333
6333
|
}
|
|
6334
|
+
if ((_b = this._runOptions) === null || _b === void 0 ? void 0 : _b.queryParameters) {
|
|
6335
|
+
const urlObject = new URL(furl);
|
|
6336
|
+
const parameters = this._runOptions.queryParameters.split("&");
|
|
6337
|
+
for (const param of parameters) {
|
|
6338
|
+
const [a, b] = param.split(/[:=]/);
|
|
6339
|
+
if (a && b) {
|
|
6340
|
+
urlObject.searchParams.set(a, b);
|
|
6341
|
+
}
|
|
6342
|
+
}
|
|
6343
|
+
furl = urlObject.toString();
|
|
6344
|
+
}
|
|
6334
6345
|
furl += '#' + frame.id;
|
|
6335
6346
|
frame.src = furl;
|
|
6336
6347
|
frame.frameBorder = "0";
|
|
6337
6348
|
frame.dataset['runid'] = this.runId;
|
|
6338
6349
|
frame.dataset['origin'] = new URL(furl).origin || "*";
|
|
6339
|
-
if ((
|
|
6350
|
+
if ((_c = this._runOptions) === null || _c === void 0 ? void 0 : _c.autofocus)
|
|
6340
6351
|
frame.setAttribute("autofocus", "true");
|
|
6341
6352
|
wrapper.appendChild(frame);
|
|
6342
6353
|
const i = document.createElement("i");
|