Headless
    class HeadlessJsTaskContext
Helper class for dealing with JS tasks. Handles per-ReactContext active task tracking, starting / stopping tasks and notifying listeners.
Functions
Link copied to clipboard
                  Register a task lifecycle event listener. Synchronized in order to prevent race conditions with finishTask, as the listener will be invoked for already running tasks.
Link copied to clipboard
                  Finish a JS task. Doesn't actually stop the task on the JS side, only removes it from the list of active tasks and notifies listeners.
Link copied to clipboard
                  Get whether there are any running JS tasks at the moment.
Link copied to clipboard
                  Check if a given task is currently running. A task is stopped if either finishTask is called or it times out.
Link copied to clipboard
                  Unregister a task lifecycle event listener.
Link copied to clipboard
                  Link copied to clipboard
                  Start a JS task. Handles invoking AppRegistry.startHeadlessTask and notifying listeners.