I am trying to use electron's webFrame.executeJavaScriptInIsolatedWorld method but I get an error saying its not a function. I am trying to use this in a preload script of a webview.
import { webFrame } from 'electron'
webframe.executeJavaScriptInIsolatedWorld(123 , [{code: 'alert("hello")'}])
When I console log the webframe object and check its prototypes then
executeJavaScriptInIsolatedWorld is not present there so I understand why I am getting the error. But the electron docs (here) mentions that this method is available. I am a little confused by this. Am I using it in the wrong location? Can this not be used inside a webview's preload?