I'm trying to subclass the WKWebViewControlMBS
https://www.monkeybreadsoftware.net/control-wkwebviewcontrolmbs.shtml
to make it a drop-in replacement for the Xojo HTMLViewer.
One thing missing is the TitleChanged event.
For the long term, please consider this a feature request, but for the short
term, I'm wondering if it can be accomplished with declares?
For example, the following Swift4 code will add an observer to a WKWebview's
title property:
// add an observer for the .title property
webView.addObserver(self, forKeyPath: #keyPath(WKWebView.title),
options:[.new], context:nil )
override func observeValue(forKeyPath keyPath: String?, of object: Any?,
change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if keyPath == "title" {
webView.titleChanged()
}
}
Can we do something similar in pure Xojo and/or using existing MBS functions?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info