forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcross-origin-good.html
More file actions
34 lines (30 loc) · 846 Bytes
/
cross-origin-good.html
File metadata and controls
34 lines (30 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<body>
<h2>Monaco Editor cross origin correct</h2>
<div style="clear:both"></div>
<div id="container" style="float:left;width:800px;height:450px;border: 1px solid grey"></div>
<div style="clear:both"></div>
<script src="../metadata.js"></script>
<script src="dev-setup.js"></script>
<script>
window.MonacoEnvironment = {
getWorkerUrl: function() {
return 'cross-origin-worker-proxy.js#http://localhost:8088' + RESOLVED_CORE_PATH;
}
};
</script>
<script>
loadEditor(function() {
monaco.editor.create(document.getElementById('container'), {
value: document.documentElement.innerHTML,
language: 'css'
});
}, 'http://localhost:8088');
</script>
</body>
</html>