Interface Step.Body

All Superinterfaces:
org.teavm.jso.JSObject
Enclosing interface:
Step

public static interface Step.Body extends org.teavm.jso.JSObject
The callback the platform calls for a step.

JavaScript calls this with a JavaScript frame on the stack, where a call that suspends cannot run. So it starts the body on a fiber and answers with a promise, the way a trigger's entry point does.

  • Method Summary

    Modifier and Type
    Method
    Description
    static Step.Body
     
    org.teavm.jso.core.JSPromise<TSObject>
    run(org.teavm.jso.JSObject context)
     

    Methods inherited from interface org.teavm.jso.JSObject

    cast
  • Method Details

    • run

      org.teavm.jso.core.JSPromise<TSObject> run(org.teavm.jso.JSObject context)
    • of

      static Step.Body of(Callable<TSObject> body)
      Parameters:
      body - the Java body
      Returns:
      a callback running it