I created a window(NSPanel) with a webview for users. Now I want to know when user close the window. How can I do it?
I am trying to use NSWindowDelegate - windowWillClose but I can't see how to set this delegate to my panel.
Check out SKPM’s web view code https://github.com/skpm/sketch-module-web-view/blob/master/lib/set-delegates.js#L63 you might just look into using SKPM with the webview template too.