File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
src/de/inetsoftware/jwebassembly/web Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package de .inetsoftware .jwebassembly .web ;
1717
18+ import javax .annotation .Nonnull ;
19+
1820import de .inetsoftware .jwebassembly .api .annotation .Import ;
1921
2022/**
@@ -79,7 +81,7 @@ protected JSObject( Object peer ) {
7981 * @return the value of the property
8082 */
8183 protected <T > T get ( String propName ) {
82- return get0 ( peer , propName );
84+ return get0 ( peer , domString ( propName ) );
8385 }
8486
8587 /**
@@ -110,6 +112,19 @@ protected <T> T get( String propName ) {
110112 * @return the return value
111113 */
112114 protected <T > T invoke ( String methodName , Object param1 ) {
113- return invoke1 ( peer , methodName , param1 );
115+ return invoke1 ( peer , domString ( methodName ), param1 );
116+ }
117+
118+ /**
119+ * Get the dom string from a java string https://developer.mozilla.org/de/docs/Web/API/DOMString
120+ *
121+ * @param str
122+ * the Java string
123+ * @return dom string
124+ */
125+ public static String domString ( @ Nonnull String str ) {
126+ // in pure we return simple the string
127+ // in wasm code this method should be replaced
128+ return str ;
114129 }
115130}
You can’t perform that action at this time.
0 commit comments