Class Scheduling
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalScheduling object provides methods and properties to control scheduling tasks within the current document.
[Value("Scheduling")]
public class Scheduling
- Inheritance
-
Scheduling
- Inherited Members
Remarks
WARNING
The
Schedulinginterface has been superseded by the Scheduler interface, the features of which are better designed for addressing scheduling tasks. See Don't useisInputPending()for more details.
-Scheduler interface
-{{domxref("Prioritized_task_scheduling_api", "Prioritized Task Scheduling API", "", "nocode")}}
-Faster input events with Facebook's first browser API contribution on engineering.fb.com (2019)
-Better JS scheduling with isInputPending() on developer.chrome.com (2020)
-Optimizing long tasks on web.dev (2022)
Constructors
Scheduling()
public Scheduling()
Methods
IsInputPending(IsInputPendingOptions)
NOTE
ExperimentalisInputPending() method of the Scheduling interface allows you to check whether there are pending input events in the event queue, indicating that the user is attempting to interact with the page.
[Value("isInputPending")]
public bool IsInputPending(IsInputPendingOptions isInputPendingOptions = null)
Parameters
isInputPendingOptionsIsInputPendingOptions
Returns
- bool
A boolean that indicates whether there are pending input events in the event queue (
true) or not (false).
Remarks
This feature can be useful in situations where you have a queue of tasks to run, and you want to yield to the main thread regularly to allow user interaction to occur so that the app is kept as responsive and performant as possible. isInputPending() allows you to yield only when there is input pending, rather than having to do it at arbitrary intervals.
WARNING
The
isInputPending()method has been superseded by features available on the Scheduler interface such as Yield(), which are better designed for addressing scheduling tasks. See Don't useisInputPending()for more details.
isInputPending() is called using navigator.scheduling.isInputPending().
-Scheduler interface
-{{domxref("Prioritized_task_scheduling_api", "Prioritized Task Scheduling API", "", "nocode")}}
-Faster input events with Facebook's first browser API contribution on engineering.fb.com (2019)
-Better JS scheduling with isInputPending() on developer.chrome.com (2020)
-Optimizing long tasks on web.dev (2022)