Navigation
API > API/Runtime > API/Runtime/WebBrowser
Representation of a remote JS async response object. UFUNCTIONs taking a FWebJSResponse will get it passed in automatically when called from a web browser. Pass a result or error back by invoking Success or Failure on the object. UFunctions accepting a FWebJSResponse should have a void return type, as any value returned from the function will be ignored. Calling the response methods does not have to happen before returning from the function, which means you can use this to implement asynchronous functionality.
Note that the remote object will become invalid as soon as a result has been delivered, so you can only call either Success or Failure once.
| Name | FWebJSResponse |
| Type | struct |
| Header File | /Engine/Source/Runtime/WebBrowser/Public/WebJSFunction.h |
| Include Path | #include "WebJSFunction.h" |
Syntax
USTRUCT ()
struct FWebJSResponse : public FWebJSCallbackBase
Inheritance Hierarchy
- FWebJSCallbackBase → FWebJSResponse
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| WebJSFunction.h | |||
FWebJSResponse
(
TSharedPtr< FWebJSScripting > InScripting, |
WebJSFunction.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Failure
(
T Arg |
Indicate failed completion, passing an error message back to JS. | WebJSFunction.h | |
void Success () |
Indicate successful completion without a return value. | WebJSFunction.h | |
void Success
(
T Arg |
Indicate successful completion passing a return value back. | WebJSFunction.h |