Function not found


Hi, I’m trying to call the function enableSlowWholeDocumentDraw on a webview, here’s my code so far:

webViewLoaded(args: EventData){
    if (isAndroid && android.os.Build.VERSION.SDK_INT >= 21){
        let myWebView: WebView = <WebView>args.object;           ;           

And the html file:

<WebView id=“myWebView” row=“0” (loaded)=“webViewLoaded($event)” [src]=“url”>

When I try to call enableSlowWholeDocumentDraw I receive the message “JS: ERROR TypeError: is not a function”. I’ve tried to run on emulator with the command-line tns run android --compileSdk 23 but it still not work.

Edit: The emulator is running android 6.0


enableSlowWholeDocumentDraw is a satic method, you are trying to call it on an instance. You may try android.webkit.WebView.enableSlowWholeDocumentDraw() from your app.ts or app.module.ts in case of Angular.


Thank you! I finally solved the problem. I had to generate the metadata for android API 23 and chall the static function as you said.