Cant FInd callBTT in wev=bview.

Any thoughts on whey callBTT() can't be found using this code in a webview?

<html>
	<head>	
		<script>
			async function foo() {
				var result = await callBTT('set_string_variable', {variable_name: 'aVar', to: "some value"});
				console.log( "result", result )
			}

			foo()
		</script>

	</head>
	
	<body> 
		This is a test			
	</body>	
</html>

are you using the BTT webview action? (it won't work in any other webview)

Yeah:

Possibly try to delay the call a bit. It might be possible that the callBTT function has not been injected when calling a script immediately:

setTimeout(() => {foo(), 100})

that did it. thanks