You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constdefaultValue=`async function main() { // select this text with the mouse and an error will appear in the console}main().catch((err) => console.error(err))`;classMyElementextendsHTMLElement{constructor(){super();constshadowRoot=this.attachShadow({mode: "open"});conststyleLink=document.createElement('link');styleLink.rel='stylesheet';styleLink.href='node_modules/monaco-editor/min/vs/editor/editor.main.css'shadowRoot.appendChild(styleLink);}connectedCallback(){constconatiner=document.createElement("div");conatiner.style.width='100%'conatiner.style.height='320px'conatiner.style.resize='both'conatiner.style.overflow='hidden'this.shadowRoot?.appendChild(conatiner);monaco.editor.create(conatiner,{value: defaultValue,theme: 'vs-dark',language: "javascript",automaticLayout: true,});}}customElements.define('my-element',MyElement);
Reproduction Steps
Select the text in editor with the mouse
An error will appear in the console
Actual (Problematic) Behavior
An error occurred in the console
Expected Behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
functionshadowCaretRangeFromPoint(shadowRoot,x,y){constrange=document.createRange();// Get the element under the pointletel=shadowRoot.elementFromPoint(x,y);if(el!==null){// parameter 1 is not of type 'Node'. // <---range.setStart(el.firstChild,offset);range.setEnd(el.firstChild,offset);}returnrange;}
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
Link To Monaco Playground
Monaco Editor Playground Code
Reproduction Steps
Actual (Problematic) Behavior
An error occurred in the console
Expected Behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: