Working elaboration of the only close-to-working example of WkWebView's WKScriptMessageHandlerWithReply protocol that I've ever found.
WKScriptMessageHandlerWithReply - versus WKScriptMessageHandler - enables two-way communication between native Swift and javascript in a WkWebView.
Credit to Jason at https://stackoverflow.com/users/135203/jason
Got it working, flipped it to Swiftui from UIKit, and added echoing of the javascript console to the calling html page.
Documentation for WKScriptMessageHandlerWithReply largely non-existent and for most people - like me - could request and retrieve a javscript message but couldn't successfully reply to the javascript message for two-way communication without getting a seemingly untraceable error: "JavaScript evaluation error: Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}."
Years of thrashing about @Sendable data types and @MainActor and threading. Nope.
Signature for the undocumented Javascript function was the culprit.