Home Reference Source
import CoreServiceProvider from '@osjs/client/src/providers/core.js'
public class | source

CoreServiceProvider

Extends:

@osjs/common~ServiceProvider → CoreServiceProvider

OS.js Core Service Provider

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public

Method Summary

Public Methods
public

Provides Clipboard contract

public

Provides DOM contract

public

Provides DnD contract

public

Expose some internals to global

public

Provides localization contract

public

Provides Middleware contract

public

Provides Packages contract

public

Provides Session contract

public

Provides Sounds contract

public

Provides Theme contract

public

Provides Tray contract

public

Provides window contract

public

Destroys provider

public

Initializes provider

public

Get a list of services this provider registers

public

Registers contracts

public

Starts provider

Private Methods
private

_onDistChanged(filename: string)

Event when dist changes from a build or deployment

private

Event when package dist changes from a build or deployment

Public Constructors

public constructor(core: Core, options: CoreProviderOptions) source

Params:

NameTypeAttributeDescription
core Core

OS.js Core

options CoreProviderOptions
  • optional
  • default: {}

Arguments

Public Members

public clipboard: Clipboard source

public middleware: Middleware source

public pm: Packages source

public session: Session source

public tray: Tray source

Public Methods

public createClipboardContract(): CoreProviderClipboardContract source

Provides Clipboard contract

public createDOMContract(): CoreProviderDOMContract source

Provides DOM contract

public createDnDContract(): CoreProviderDnDContract source

Provides DnD contract

public createGlobalApi(): * source

Expose some internals to global

Return:

*

public createLocaleContract(): CoreProviderLocaleContract source

Provides localization contract

public createMiddlewareContract(): CoreProviderMiddlewareContract source

Provides Middleware contract

public createPackagesContract(): CoreProviderPackagesContract source

Provides Packages contract

public createSessionContract(): CoreProviderSessionContract source

Provides Session contract

public createSoundsContract(): CoreProviderSoundContract source

Provides Sounds contract

public createThemeContract(): CoreProviderThemeContract source

Provides Theme contract

public createTrayContract(): CoreProviderTrayContract source

Provides Tray contract

public createWindowContract(): CoreProviderWindowContract source

Provides window contract

public destroy() source

Destroys provider

public init(): Promise<undefined> source

Initializes provider

Return:

Promise<undefined>

public provides(): string source

Get a list of services this provider registers

Return:

string

public registerContracts() source

Registers contracts

public start(): Promise<undefined> source

Starts provider

Return:

Promise<undefined>

Private Methods

private _onDistChanged(filename: string) source

Event when dist changes from a build or deployment

Params:

NameTypeAttributeDescription
filename string

The resource filename

private _onPackageChanged(name: string) source

Event when package dist changes from a build or deployment

Params:

NameTypeAttributeDescription
name string

The package name