void () { JBCefClient client = JBCefApp.getInstance().createClient(); client.setProperty(JBCefClient.Properties.JS_QUERY_POOL_SIZE, 1); JBCefBrowser browser = JBCefBrowser.createBuilder() .setOffScreenRendering(true) .setClient(client) .setCreateImmediately(true) .build(); JBCefJSQuery jsQuery = JBCefJSQuery.create((JBCefBrowserBase)browser); doTest(browser, jsQuery); }