mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
Fixes webcomponent sample for local development
This commit is contained in:
parent
f3cac1faff
commit
4886e1da08
1 changed files with 5 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue