'you need webviewextras to execute javascript, not webview
dim wvx as webviewextras
dim javascript2 as stringbuilder
javascript2.initialize
javascript2.append("var toInsert = document.createElement('div');").append("toInsert.innerHTML = '").append(x).append('";")
log( "looks like this: " & javascript2.tostring )
wvx.execute.javascript( webview1, javascript2.toString )
' pay close attention to single quotes next to double quotes
' no guarantee that code will actually do what you think it does. you asked only how to include variable x in the stringbuilder.
' ---------------------------------------------------------------------------------------------------------------------------------------------
' you can also do this with a smart string and have it look just like html text:
dim smartjavascript as string = $"var toInsert = document.createElement('div');
toInsert.innerHTML = '${x}';
"$
Log("done with smart string: " & smartjavascript)