How to use an ICP callback in a web view

When using a web view GtWebViewElement BlElement << #GtWebViewElement traits: {TBrLayoutResizable + TGtWebView}; slots: { #protoWebView . #navigationHeader }; tag: 'Core - UI'; package: 'GToolkit-WebView' we can use IPC callbacks to executed actions in GT when performing actions in a browser.

html := '<!DOCTYPE html>
<html>
<body>

<h1>Spawn object</h1>

<button type="button" onclick="window.ipc.postMessage(''hello!'')">Click Me!</button>

</body>
</html>'.
  
webView := GtWebViewElement new
	html: html.

webView
	when: GtWebViewIpcMessage
	do: [ :aMessage |
		aMessage currentTarget phlow spawnObject: aMessage content ].

webView