You webpage needs include:
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
ThunkableWebviewerExtension.postMessage('hello world');
You can find instructions and details here: