diff --git a/website/scripts/check-playground-samples-js.ts b/website/scripts/check-playground-samples-js.ts index dffcc62e..b0fa28c4 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", 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 07dc477f..9f178b30 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")