We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
elementToAppend
domID
1 parent 3253346 commit 0de2a84Copy full SHA for 0de2a84
packages/sandbox/src/index.ts
@@ -144,7 +144,7 @@ export const createTypeScriptSandbox = (
144
145
const language = languageType(config)
146
const filePath = createFileUri(config, compilerOptions, monaco)
147
- const element = "domID" in config ? document.getElementById(config.domID) : (config as any).elementToAppend
+ const element = (config as any).elementToAppend ? (config as any).elementToAppend : document.getElementById(config.domID)
148
149
const model = monaco.editor.createModel(defaultText, language, filePath)
150
monaco.editor.defineTheme("sandbox", sandboxTheme)
0 commit comments