()
| 25 | const disposables: vscode.Disposable[] = [] |
| 26 | |
| 27 | function createWebViewPanel(): vscode.WebviewPanel { |
| 28 | const viewType = 'CodeRoad' |
| 29 | const title = 'CodeRoad' |
| 30 | const config = { |
| 31 | // Enable javascript in the webview |
| 32 | enableScripts: true, |
| 33 | // And restrict the webview to only loading content from our extension's `media` directory. |
| 34 | localResourceRoots: [vscode.Uri.file(path.join(extensionPath, 'build'))], |
| 35 | // prevents destroying the window when it is in the background |
| 36 | retainContextWhenHidden: true, |
| 37 | // allows scripts to load external resources (eg. markdown images, fonts) |
| 38 | enableCommandUris: true, |
| 39 | } |
| 40 | state.loaded = true |
| 41 | return vscode.window.createWebviewPanel(viewType, title, vscode.ViewColumn.Two, config) |
| 42 | } |
| 43 | |
| 44 | let panel: vscode.WebviewPanel = createWebViewPanel() |
| 45 |
no outgoing calls
no test coverage detected