From 4886e1da087e36c3c8211208e8000199762e5749 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Fri, 31 Mar 2023 12:29:44 +0200 Subject: [PATCH 1/2] Fixes webcomponent sample for local development --- .../creating-the-editor/web-component/sample.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js b/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js index 07dc477f0a..9f178b305e 100644 --- a/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js +++ b/website/src/website/data/playground-samples/creating-the-editor/web-component/sample.js @@ -11,10 +11,12 @@ customElements.define( const shadowRoot = this.attachShadow({ mode: "open" }); // Copy over editor styles - const style = document.querySelector( - "link[rel='stylesheet'][data-name='vs/editor/editor.main']" + const styles = document.querySelectorAll( + "link[rel='stylesheet'][data-name^='vs/']" ); - shadowRoot.appendChild(style.cloneNode(true)); + for (const style of styles) { + shadowRoot.appendChild(style.cloneNode(true)); + } const template = /** @type HTMLTemplateElement */ ( document.getElementById("editor-template") From 6c77360f6b8dd9ee7ea07b67f9a6a9c540100ed9 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Tue, 4 Apr 2023 11:00:31 +0200 Subject: [PATCH 2/2] Sets tsc target to fix playground compile issues --- website/scripts/check-playground-samples-js.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/scripts/check-playground-samples-js.ts b/website/scripts/check-playground-samples-js.ts index dffcc62e9e..b0fa28c4e9 100644 --- a/website/scripts/check-playground-samples-js.ts +++ b/website/scripts/check-playground-samples-js.ts @@ -14,6 +14,8 @@ import { exit } from "process"; "yarn", [ "tsc", + "--target", + "es6", "--noEmit", "--allowJs", "--checkJs",