Chrome webview's clearData function is identified as nonexistent

95 Views Asked by At

I want the webview in my Chrome app to clear its cache every time it is started again. I tried using the clearData() function outlined here but the console reports that ...clearData is not a function. There was an answer here to someone who had the same problem, but that did not solve it. The getElementById part works, since I was able to change the webview's style with it. The problem is the clearData part.

html bit:

<webview class="w" id="webView" src="https://example.com"></webview>

javascript:

document.getElementById('webView').clearData({start:0},{cache:true});
0

There are 0 best solutions below