Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TodoListWebview HTML
public open(pageId: string, opts: { onClose: () => void }) {
// ...
const scriptSrc = webviewPanel.webview
.asWebviewUri(Uri.file(this.context.asAbsolutePath(this.envelopeLocator.envelopePath)))
.toString();
webviewPanel.webview.html = `<!DOCTYPE html>
<html lang="en">
<head>
<style>
html, body, div#envelope-app {
margin: 0;
border: 0;
padding: 10px;
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="envelope-app" />
<script src="${scriptSrc}"></script>
</body>
</html>`;
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment