forked from AsafMeizner/MAutils-Extention
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebview.html
More file actions
38 lines (33 loc) · 1006 Bytes
/
webview.html
File metadata and controls
38 lines (33 loc) · 1006 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
35
36
37
38
<!-- webview.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MAutils FRC Specification</title>
<style>
/* Add your styles here */
</style>
</head>
<body>
<div id="content">
<!-- Content will be dynamically populated here -->
</div>
<script>
const vscode = acquireVsCodeApi();
// Listen for messages from the extension
window.addEventListener('message', event => {
const message = event.data;
// Check if the message is for updating content
if (message.command === 'updateContent') {
const content = message.content;
updateContent(content);
}
});
function updateContent(content) {
const contentDiv = document.getElementById('content');
contentDiv.innerHTML = content;
}
</script>
</body>
</html>