executeJavaScriptInIsolatedWorld

fun executeJavaScriptInIsolatedWorld(worldId: Double, scripts: ReadonlyArray<WebSource>, userGesture: Boolean = definedExternally): Promise<Any?>(source)

A promise that resolves with the result of the executed code or is rejected if the result of the code is a rejected promise.

Works like executeJavaScript but evaluates scripts in an isolated context.