Community
Participate
Working Groups
Created attachment 287762 [details] simple demo BrowserFunction gets stuck if "evaluate" is invoked inside it. This is only happening after we upgraded to Edge, worked fine on IE11 or OSX (Safari Webkit).
Created attachment 287763 [details] simple html
(In reply to Missing name from comment #0) > Created attachment 287762 [details] > simple demo > > BrowserFunction gets stuck if "evaluate" is invoked inside it. This is only > happening after we upgraded to Edge, worked fine on IE11 or OSX (Safari > Webkit). This a known issue with embedded EDGE browser(WebView2 support for SWT). Limitation of 'evaluate()' method is mentioned in below readme file: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/174084/8/bundles/org.eclipse.swt/Readme.WebView2.md#103
Work-around: - Suggested to use async call, similar to attachment 287762 [details] Possible alternate: - by exposing the asynchronous `evaluate()` method
Hi, any update on this issue? Unfortunately, async can't be used in my scenario as the value is needed in order for the application to continue.
Hi @Niraj Modi, is it possible to do a synchrounous operation for browser.evaluate()? I need to use the result from evaluate in the next line of program . I have a scenario something like this : class TestNamespacesFunction extends BrowserFunction { private static final String FUNCTION_NAME = "createNamespaces"; //$NON-NLS-1$ Browser browser; Object test; WrapNamespacesFunction(Browser browser) { super(browser, FUNCTION_NAME); this.browser = browser; } @Override public Object function(Object[] arguments) { test = null; final String IS_UNDEFINED_SCRIPT = "return typeof({0}) != ''function'';"; //$NON-NLS-1$ test = browser.evaluate(MessageFormat.format(IS_UNDEFINED_SCRIPT, "createNamespaces")); return test; } } Appreciate any thoughts ?