John Doe John Doe - 7 months ago 84
Android Question

How to disable and reenable Javascript in XWalkView?

I'm using XWalkView stable 18.48.477.13 on android and wanted to disable javascript since it's by default enabled.

The standard android WebView has the method WebSettings.setjavascriptenabled to enable or disable JS.

So anyone knows how i could disable and reenable Javascript in XWalkView?
Maybe its XWalkView.pauseTimers() and XWalkView.resumeTimers(), but it would affect all XWalkView instances which is not what i need in my case.


There's a class XWalkSettings just like WebSettings. But the method setJavaScriptEnabled in XWalkSettings is not yet exposed to external. This API will be available in Crosswalk-21.