Interface IEvalInPage
Namespace: AppManaPublic.Configuration
The interface to the object that will ultimately provide javascript execution within the context of the web player.
public interface IEvalInPage
Methods
EvalInPage<T>(string, Func<T>, float)
Evaluates the provided JavaScript code in the context of the user's page.
UniTask<T> EvalInPage<T>(string javascript, Func<T> editorStubResponse = null, float editorDelaySeconds = 0.2)
Parameters
javascript string
The code to execute. This will be awaited.
editorStubResponse Func<T>
When running in editor, return this stub instead.
editorDelaySeconds float
When running in editor, delay the reply by this amount of time.
Returns
UniTask<T>
The JSON response, deserialized.
Type Parameters
T
The expected type of the response. It should be JSON serializable. Use JToken to interpret as a general JSON value.
EvalInPage(string, Action)
Evaluates the provided JavaScript code in the context of the user's page.
void EvalInPage(string javascript, Action editorStub = null)
Parameters
javascript string
editorStub Action
