File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,6 +303,10 @@ <h1>Playground</h1>
303303 super();
304304 const shadow = this.attachShadow({ mode: 'open' });
305305
306+ const style = document.createElement('style');
307+ style.textContent = ':host{display:block;width:100%;height:100%}#editor{width:100%;height:100%}';
308+ shadow.appendChild(style);
309+
306310 // Add Monaco CSS inside the shadow root
307311 const link = document.createElement('link');
308312 link.rel = 'stylesheet';
@@ -311,9 +315,8 @@ <h1>Playground</h1>
311315
312316 // Editor host div
313317 const div = document.createElement('div');
314- div.style.cssText = 'width:100%;height:100% ';
318+ div.id = 'editor ';
315319 shadow.appendChild(div);
316- this.style.cssText = 'display:block;width:100%;height:100%';
317320
318321 link.onload = () => {
319322 monaco.editor.create(div, {
You can’t perform that action at this time.
0 commit comments