Skip to content

Test: Monaco Editor inside shadow DOM #89392

@alexdima

Description

@alexdima

Complexity: 4

Tester1 - Gecko (Firefox)
Tester2 - WebKit (Safari)
Tester3 - Chromium (new Edge, Chrome, Opera)

FYI @chrisdias

Parts of this support came in via a PR and parts I did, but there isn't really any issue that we're testing because this wasn't officially on the plan. Trying things out a bit is interesting because we might want to consider using Shadow DOM internally, in VS Code.

To test, you need to:

  1. have vscode checked out and compiling via gulp watch
  2. clone https://github.com/microsoft/monaco-editor/ as a sibling to vscode
  3. in monaco-editor, run npm install and npm run simpleserver
  4. open http://127.0.0.1:8080/monaco-editor/test/shadow-dom.html?editor=src (it is important that editor=src is in there)

Then, simply try to do some things in the editor... We had to do special things around mouse handling and CSS as the shadow DOM nodes were hidden from the outer document, but there might be other things which could be broken... You can further try to do interesting things like changing the language or changing editor settings by editing the shadow-dom.html file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions