Package de.inetsoftware.jwebassembly.web
Class JSObject
java.lang.Object
de.inetsoftware.jwebassembly.web.JSObject
- Direct Known Subclasses:
EventTarget,NodeList,Window
The base type for all wrapped JavaScript objects.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DOMStringGet the dom string from a java string https://developer.mozilla.org/de/docs/Web/API/DOMStringprotected <T> TGet the value of a property of this object.private static <T> TNative get a JavaScript property value by name.protected <T> TInvoke a JavaScript method with one non string parameter of this object.protected <T> TInvoke a JavaScript method with one string parameter of this object.private static <T> TNative invoke a JavaScript method with one parameter.protected voidSet the value of a property of this object.private static voidNative set a JavaScript property value by name.protected static <T> TGet a JavaScript property value by name from global variable window.private static <T> TNative get a JavaScript property value by name from global variable window.
-
Field Details
-
WEB
module name for JavaScript helper of the web- See Also:
-
peer
Native object from JavaScript.
-
-
Constructor Details
-
JSObject
Create a Java instance as wrapper of the JavaScript object.- Parameters:
peer- the native JavaScript object
-
-
Method Details
-
win_get0
Native get a JavaScript property value by name from global variable window.- Type Parameters:
T- the return type- Parameters:
propName- the name of the property as DOMString- Returns:
- the value of the property
-
win_get
Get a JavaScript property value by name from global variable window.- Type Parameters:
T- the return type- Parameters:
propName- the name of the property as DOMString- Returns:
- the value of the property
-
get0
Native get a JavaScript property value by name.- Type Parameters:
T- the return type- Parameters:
peer- the JavaScript objectpropName- the name of the property as DOMString- Returns:
- the value of the property
-
get
Get the value of a property of this object.- Type Parameters:
T- the return type- Parameters:
propName- the name of the property- Returns:
- the value of the property
-
set0
Native set a JavaScript property value by name.- Parameters:
peer- the JavaScript objectpropName- the name of the property as DOMStringvalue- the value of the property
-
set
Set the value of a property of this object.- Parameters:
propName- the name of the propertyvalue- the value of the property
-
invoke0
Native invoke a JavaScript method with one parameter.- Type Parameters:
T- the return type- Parameters:
peer- the JavaScript objectmethodName- the method nameparam1- the parameter- Returns:
- the return value
-
invoke
Invoke a JavaScript method with one string parameter of this object.- Type Parameters:
T- the return type- Parameters:
methodName- the method nameparam1- the parameter- Returns:
- the return value
-
invoke
Invoke a JavaScript method with one non string parameter of this object.- Type Parameters:
T- the return type- Parameters:
methodName- the method nameparam1- the parameter- Returns:
- the return value
-
domString
Get the dom string from a java string https://developer.mozilla.org/de/docs/Web/API/DOMString- Parameters:
str- the Java string- Returns:
- dom string
-