Call javascript function from Swift in Capacitor

I completed the capacitor iOS example by packaging a web game (Phaser). It runs fine but I would like to know how to call into a javascript function in the game from native Swift code. I see an extended WKWebView in the capacitor pod but I don’t see how it’s used in the app. I need to do the same in android but I’ll do that in another post.

Any thoughts?