Search code examples
iosuiwebviewnativescriptwkwebview

NativeScript is WebView an WKWebView?


I have build an app with an NativeScript WebView and all working good. But the speed performance of the content inside the WebView is much slower then in for exemple Safari.

main-page.js

var createViewModel = require("./main-view-model").createViewModel;
var webViewModule = require("tns-core-modules/ui/web-view");

function onNavigatingTo(args) {

  var page = args.object;
  var webView = page.getViewById("webview");
  webView.on(webViewModule.WebView.loadFinishedEvent, function () {});

  webView.src = "https://google.com";

  page.bindingContext = createViewModel();

}


exports.onNavigatingTo = onNavigatingTo;

My question is:

Is NativeScript WebView an UIWebView? And if so, how do I get the UIWebView to and WKWebView?


Solution

  • NativeScript 3.4+ uses WKWebView.