Skip to content

UWP browser execute issue #3239

@triplesub

Description

@triplesub

There appears to be an issue with UWP builds running JavaScript inside a BrowserComponent.

BrowserComponent browserComponent = new BrowserComponent();
browserComponent.addWebEventListener(BrowserComponent.onLoad, evt -> {
    Log.p("onLoad start", Log.INFO);
    Log.p(browserComponent.executeAndReturnString("document.documentElement.outerHTML"), Log.INFO);
    Log.p("onLoad end", Log.INFO);
});

Form form = new Form("Browser Contents Test", new BorderLayout());
form.add(BorderLayout.CENTER, browserComponent);
form.show();

browserComponent.setURL("http://www.codenameone.com");

The above works as you would expect on Android, iOS and in the simulator. In a UWP app this is everything in the log:

[EDT] 0:0:1,837 - Codename One revisions: 7dd4e7d08b3442d90959477ee52a5ae8c4361b29
[EDT] 0:0:1,891 - onLoad start

The executeAndReturnString never returns. I have tried an asynchronous BrowserComponent.execute method and the callback is never called.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions