Skip to content

Commit f172110

Browse files
bogeylnjAlainODea
authored andcommitted
capture-js-console-output (#273)
1 parent 1617461 commit f172110

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/okta/tools/authentication/BrowserAuthentication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.okta.tools.OktaAwsCliEnvironment;
44
import com.okta.tools.helpers.CookieHelper;
55
import com.okta.tools.util.NodeListIterable;
6+
import com.sun.javafx.webkit.WebConsoleListener;
67
import javafx.application.Application;
78
import javafx.scene.Group;
89
import javafx.scene.Scene;
@@ -73,6 +74,10 @@ public void start(final Stage stage) throws IOException {
7374
System.out.format("exception(%s => %s)\n%s\n", oldState, newState, webEngine.getLoadWorker().getException());
7475
});
7576

77+
WebConsoleListener.setDefaultListener((webView, message, lineNumber, sourceId) -> {
78+
System.out.println("WebConsoleListener: " + message + "[at " + lineNumber + "]");
79+
});
80+
7681
webEngine.load(uri.toASCIIString());
7782

7883
scene.setRoot(scrollPane);

0 commit comments

Comments
 (0)