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
This issue is not a bug report. (please use a different template for reporting a bug)
This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
monaco-editor will dynamically create a monaco-colors style element and append it to DOM. But the code is to append to DOM first, then to set its className and textConent.
That is not a bug for monaco-editor, but may cause some bugs in the user application, especially with the micro-frontends applications like qiankun.
For example, most of the micro-frontends applications rewrote the document.head.appendChild method to handle style isolation. When monaco-editor append the monaco-colors style element, style isolation handle function couldn't get any information from that element which was empty at that time.
In my case, I want to prevent this style from being handled by qiankun, like
csu-feizao
changed the title
[Feature Request] Set className and textontent in the dynamic style element "monaco-colors" before appended
[Feature Request] Set className and textContent in the dynamic style element "monaco-colors" before appended
Mar 10, 2023
Context
Description
monaco-editor
will dynamically create amonaco-colors
style element and append it toDOM
. But the code is to append toDOM
first, then to set itsclassName
andtextConent
.That is not a bug for
monaco-editor
, but may cause some bugs in the user application, especially with themicro-frontends
applications like qiankun.For example, most of the
micro-frontends
applications rewrote thedocument.head.appendChild
method to handlestyle isolation
. Whenmonaco-editor
append themonaco-colors
style element,style isolation
handle function couldn't get any information from that element which was empty at that time.In my case, I want to prevent this style from being handled by
qiankun
, likeSo can we change the order of creating the 'monaco-colors' style element? If ok I would like to create a pr
There is the original code:
vscode -> src/vs/editor/standalone/browser/standaloneThemeService.ts -> line 285
vscode -> src/vs/base/browser/dom.ts -> line 694
There is the code after being changed:
vscode -> src/vs/editor/standalone/browser/standaloneThemeService.ts -> line 285
vscode -> src/vs/base/browser/dom.ts -> line 694
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
The text was updated successfully, but these errors were encountered: