Resolved: I am getting this error Uncaught ReferenceError: jQuery is not defined while calling internal url



When I try to load my internal URL in webview I am getting this error ‘jQuery is not defined’.
I can open the same url in chrome/firefox without any issues.
Other external websites also loading without any issues.

Do I need to make any settings in electron to fix this issue.



do you open it in main or child process?!


You need to turn off nodeIntegration on that WebView. It’s a good idea for security anyway, as you don’t want a remote website to be able to hi-jack your app and do things to a user’s file system, etc.

The reason this is happening is that the window defaults to having it nodeIntegration turned on, and jQuery is instead attaching to module rather than window.



I am opening webview in child process


@caffiend please find my webview settings.

<webview class="personal" id='test' allowpopups webpreferences='allowRunningInsecureContent' autosize minwidth="1100" minheight="790" plugins disablewebsecurity src=""></webview>

As per this node integration is disabled bydefult.

This is running in child process.It would be great if you can point what is the exact change i need to make in that



if you’re loading an internal URL why not use a browser window with loadURL method?


@biroplane : My application is kind of a mini browser that will load lot of external URLs, in the middle I am getting internal URL also, is it possible to load that in browser window ? Please guide me on that.


Thanks for all

I removed following lines from main.js and code is working fine

app.commandLine.appendSwitch ('--disable-http-cache');
app.commandLine.appendSwitch ('--disable-http2');
app.commandLine.appendSwitch ('enable-d3d11');
app.commandLine.appendSwitch ('Scroll Prediction');
app.commandLine.appendSwitch ('Number of Raster Threads','1000000');
app.commandLine.appendSwitch ('smooth-scrolling');

I added these lines to check some feature, some how these lines are breaking jquery feature in webview