Skip to content

Commit

Permalink
Replaced JSNI call with Elemental2/JsInterop in Console
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Feb 4, 2024
1 parent f170c5e commit 7884b44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions webfx-platform-console-gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

<dependencies>

<dependency>
<groupId>com.google.elemental2</groupId>
<artifactId>elemental2-dom</artifactId>
</dependency>

<dependency>
<groupId>dev.webfx</groupId>
<artifactId>webfx-platform-console</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.webfx.platform.console.spi.impl.gwt;

import dev.webfx.platform.console.spi.ConsoleProvider;
import elemental2.dom.DomGlobal;

/**
* @author Bruno Salmon
Expand All @@ -20,6 +21,8 @@ public void logNative(Object nativeObject) {
logConsole(nativeObject);
}

private static native void logConsole(Object message) /*-{ $wnd.console.log(message); }-*/;
private static void logConsole(Object message) {
DomGlobal.console.log(message);
}

}

0 comments on commit 7884b44

Please sign in to comment.