Implement wxWebView::GetVersionInfo() for macOS
Return the operating system version as the WebKit version used by WKWebView is bound to the OS. (Also works for iOS)
This commit is contained in:
@@ -122,6 +122,7 @@ public:
|
||||
long style = 0,
|
||||
const wxString& name = wxASCII_STR(wxWebViewNameStr))
|
||||
{ return new wxWebViewWebKit(parent, id, url, pos, size, style, name); }
|
||||
virtual wxVersionInfo GetVersionInfo() wxOVERRIDE;
|
||||
};
|
||||
|
||||
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT
|
||||
|
@@ -87,6 +87,17 @@ wxEND_EVENT_TABLE()
|
||||
@end
|
||||
#endif // macOS 10.13+
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWebViewFactoryWebKit
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
wxVersionInfo wxWebViewFactoryWebKit::GetVersionInfo()
|
||||
{
|
||||
int verMaj, verMin, verMicro;
|
||||
wxGetOsVersion(&verMaj, &verMin, &verMicro);
|
||||
return wxVersionInfo("WKWebView", verMaj, verMin, verMicro);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// creation/destruction
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user