Add repro for #2264
parent
3253e929d5
commit
fbf099e515
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dev-setup-control {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<script src="../../metadata.js"></script>
|
||||
<script src="../dev-setup.js"></script>
|
||||
<script src="iframe.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -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();
|
||||
}
|
||||
});
|
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="http://localhost:8088/monaco-editor/test/2264/iframe.html?editor=src" style="width:800px;height:600px;" sandbox="allow-same-origin allow-scripts allow-popups allow-modals allow-forms allow-downloads"></iframe>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue