JavaScript APIs / oro:background

oro:background

oro:background lets you inspect and coordinate the runtime background task surface.

Examples#

Check whether background execution is available before scheduling work:

import background from 'oro:background'

if (background.available) {
  console.log(await background.status())
}

API reference#

Module specifiers#

oro:background

TypeScript declarations#

These declarations are generated from the runtime's published TypeScript surface.

oro:background#

declare module "oro:background" {
    export default background;
    export namespace background {
        let available: boolean;
        function register(): Promise<never>;
        function schedule(): Promise<never>;
        function cancel(): Promise<never>;
        function status(): Promise<never>;
    }
}

See also#

Source repository · Edit this page · View Markdown