mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Add repro for #2264
This commit is contained in:
parent
3253e929d5
commit
fbf099e515
3 changed files with 65 additions and 0 deletions
22
test/2264/iframe.js
Normal file
22
test/2264/iframe.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const init = () => {
|
||||
loadEditor(function() {
|
||||
// create the editor
|
||||
const target = document.getElementById('container');
|
||||
const editor = monaco.editor.create(target, { language: 'html' });
|
||||
|
||||
// load some sample data
|
||||
(async () => {
|
||||
const response = await fetch('https://microsoft.github.io/monaco-editor/');
|
||||
const html = await response.text();
|
||||
editor.getModel().setValue(html);
|
||||
})();
|
||||
});
|
||||
};
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
if (!window.innerWidth || !window.innerHeight) {
|
||||
window.addEventListener('resize', init, { once: true });
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue