I’ve been using MBS’ WebViewMBS for displaying html code I provide directly (i.e. I do not want to display a website loaded from the internet).
But now, with Xojo 2021r3, that’s not available any more. MBS’s own documentation is not helping - it simply says it’s not available any more, but offers no help on how to substitute it.
I need this only on macOS, for iClip.
Which APIs are available, from Xojo or from MBS, that let me render a custom html string into a window view? Ideally, I’d also like to use the following features that I did before:
- Set prefs to turn off most advanced options:
dim prefs as WebPreferencesMBS = mWebView.preferences
prefs.arePlugInsEnabled = false
prefs.isJavaEnabled = false
prefs.isJavaScriptEnabled = false
prefs.allowsAnimatedImageLooping = false
prefs.allowsAnimatedImages = false
prefs.tabsToLinks = false
prefs.autosaves = false
prefs.cacheModel = WebPreferencesMBS.WebCacheModelDocumentViewer
- The rendered page should be able to use a transparent background so that I see the window’s background:
mWebView.DrawsBackground = false
- Scale the rendered view (for making a page fit into my window, avoiding scrollbars):
mWebView.mainFrame.frameView.documentView.superview.scaleUnitSquareToSize NSMakeSizeMBS (scale, scale)