+
-
-
+
diff --git a/preview/webview.js b/preview/webview.js
index 922b894..2dd8b07 100644
--- a/preview/webview.js
+++ b/preview/webview.js
@@ -59,8 +59,12 @@ async function init(state) {
// Initialize the schematic.
let root = document.querySelector('#schematic-root');
- simulator = new Simulator(blobUrl, saveState);
- await simulator.init(root, state)
+ simulator = new Simulator({
+ root: root,
+ schematicURL: blobUrl,
+ saveState: saveState,
+ });
+ await simulator.setState(state)
vscode.postMessage({
type: 'ready',
});
diff --git a/src/preview.ts b/src/preview.ts
index 8218152..f8b93e6 100644
--- a/src/preview.ts
+++ b/src/preview.ts
@@ -9,6 +9,7 @@ let boards = [
'arduino-nano33',
'circuitplay-bluefruit',
'circuitplay-express',
+ 'gopher-badge',
'hifive1b',
'microbit',
'pinetime',
@@ -111,7 +112,7 @@ async function createPanel(context: vscode.ExtensionContext, panel: vscode.Webvi
// Also, the worker shouldn't be sending invalid styles anyway (if the
// worker is hijacked, security is breached anyway).
// More information: https://stackoverflow.com/questions/30653698/#31759553
- html = html.replace('{CSP}', `default-src 'none'; script-src ${panel.webview.cspSource} blob: 'unsafe-eval'; style-src ${panel.webview.cspSource} 'unsafe-inline'; connect-src ${panel.webview.cspSource}; font-src ${panel.webview.cspSource}`);
+ html = html.replace('{CSP}', `default-src ${panel.webview.cspSource}; script-src ${panel.webview.cspSource} blob: 'unsafe-eval'; style-src ${panel.webview.cspSource} 'unsafe-inline'; connect-src ${panel.webview.cspSource}`);
panel.webview.html = html;
// Wrapper postMessage that ignores messages after the panel is disposed.
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy