title: WKWebView callback without WKScriptMessage
body: <p>There does not seem to be much information out there on using <code>WKWebView</code> with objective-c on macOS so I have been trying to make due using various iOS/Swift examples.  The problem is that my callback from JS to ObjC does not work.  Even the breakpoint set at the <code>userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message</code> function is never hit.</p>
  
  <p>Clearly I am missing a step here.</p>
  
  <p>My AppDelegate.m: </p>
  
  <pre><code>#import &lt;WebKit/WebKit.h&gt;
  #import "AppDelegate.h"
  
  @interface AppDelegate () &lt;WKScriptMessageHandler&gt;
  
  @property (weak) IBOutlet NSWindow *window;
  @end
  
  @implementation AppDelegate
  
  - (void)userContentController:(WKUserContentController *)userContentController
        didReceiveScriptMessage:(WKScriptMessage *)message {
      NSLog(@"callback");
  }
  
  - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
      WKWebViewConfiguration *config = [WKWebViewConfiguration alloc];
      [[config userContentController] addScriptMessageHandler:self name: @"log"];
      WKWebView *webview = [[WKWebView alloc] initWithFrame:[[_window contentView] frame] configuration:config];
      NSString *htmlStr = @"&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;body&gt;&lt;button type=\"button\" onclick=\"myFunction()\"&gt;Click Me!&lt;/button&gt;&lt;script     type=\"text/javascript\"&gt;function myFunction() { window.webkit.messageHandlers.log.postMessage();}&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;";
      [[_window contentView] addSubview:webview];
      [webview loadHTMLString:htmlStr baseURL:nil];
  } 
  </code></pre>