How to use an ICP callback in a web view
When using a web view GtWebViewElement
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