@@ -10,7 +10,6 @@ export function createPanel(context: vscode.ExtensionContext, data: Tree, column
1010 panel = vscode . window . createWebviewPanel (
1111 'reactLabyrinth' ,
1212 'React Labyrinth' ,
13-
1413 // create one new tab
1514 vscode . ViewColumn . One ,
1615 {
@@ -19,23 +18,18 @@ export function createPanel(context: vscode.ExtensionContext, data: Tree, column
1918 }
2019 ) ;
2120
22-
2321 // Set the icon logo of extension webview
2422 panel . iconPath = vscode . Uri . joinPath ( context . extensionUri , 'media' , 'favicon.ico' ) ;
2523
26-
2724 // Set URI to be the path to bundle
2825 const bundlePath : vscode . Uri = vscode . Uri . joinPath ( context . extensionUri , 'build' , 'bundle.js' ) ;
2926
30-
3127 // set webview URI to pass into html script
3228 const bundleURI : vscode . Uri = panel . webview . asWebviewUri ( bundlePath ) ;
3329
34-
3530 // render html of webview here
3631 panel . webview . html = createWebviewHTML ( bundleURI , data ) ;
3732
38-
3933 // Sends data to Flow.tsx to be displayed after parsed data is received
4034 panel . webview . onDidReceiveMessage (
4135 async ( msg : any ) => {
@@ -51,7 +45,6 @@ export function createPanel(context: vscode.ExtensionContext, data: Tree, column
5145 settings : vscode . workspace . getConfiguration ( 'reactLabyrinth' )
5246 } ) ;
5347 break ;
54-
5548 }
5649 } ,
5750 undefined ,
@@ -61,12 +54,9 @@ export function createPanel(context: vscode.ExtensionContext, data: Tree, column
6154 return panel
6255} ;
6356
64-
65-
6657// getNonce generates a new random string each time ext is used to prevent external injection of foreign code into the html
6758const nonce : string = getNonce ( ) ;
6859
69-
7060// function to create the HTML page for webview
7161function createWebviewHTML ( URI : vscode . Uri , initialData : Tree ) : string {
7262 return (
0 commit comments