Disabling JavaScript in <webview>


#1

Hello to All.
When we create BrowserWindow, we can disable JavaScript in it by providing {webPreferences: {javascript: false} } to constructor. But is it possible to disable JavaScript in webview?
Something like <webview disablejavascript></webview>:slight_smile:


#2

Just for anyone else reading this - you can disable JavaScript in webview by doing:

<webview src="https://github.com" webpreferences="javascript=no"></webview>

webpreferences is a comma separated list of strings, the full list of options can be found here.

https://electron.atom.io/docs/api/webview-tag/#webpreferences