Skip to content

Commit

Permalink
Merge pull request #3879 from microsoft/hediet/webcomponent-bugfix
Browse files Browse the repository at this point in the history
Fixes webcomponent sample for local development
  • Loading branch information
hediet authored Apr 5, 2023
2 parents 14a9240 + 6c77360 commit 1c6f48a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions website/scripts/check-playground-samples-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { exit } from "process";
"yarn",
[
"tsc",
"--target",
"es6",
"--noEmit",
"--allowJs",
"--checkJs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1c6f48a

Please sign in to comment.