Add repro for #2264

pull/2455/head
Alexandru Dima 4 years ago
parent 3253e929d5
commit fbf099e515
No known key found for this signature in database
GPG Key ID: 6E58D7B045760DA0

@ -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…
Cancel
Save