tinymce.dom.StyleSheetLoader

This class handles loading of external stylesheets and fires events when these are loaded.

Summary

Methods

Name Summary Defined by

load()

Loads the specified CSS file and returns a Promise that will resolve when the stylesheet is loaded successfully or reject if it failed to load.

StyleSheetLoader

loadAll()

Loads the specified CSS files and returns a Promise that is resolved when all stylesheets are loaded or rejected if any failed to load.

StyleSheetLoader

unload()

Unloads the specified CSS file if no resources currently depend on it.

StyleSheetLoader

unloadAll()

Unloads each specified CSS file if no resources currently depend on it.

StyleSheetLoader

Methods

load()

load(url: String): Promise

Loads the specified CSS file and returns a Promise that will resolve when the stylesheet is loaded successfully or reject if it failed to load.

Parameters

  • url (String) - Url to be loaded.

Return value

  • Promise - A Promise that will resolve or reject when the stylesheet is loaded.


loadAll()

loadAll(urls: Array): Promise

Loads the specified CSS files and returns a Promise that is resolved when all stylesheets are loaded or rejected if any failed to load.

Parameters

  • urls (Array) - URLs to be loaded.

Return value

  • Promise - A Promise that will resolve or reject when all stylesheets are loaded.


unload()

unload(url: String)

Unloads the specified CSS file if no resources currently depend on it.

Parameters

  • url (String) - URL to unload or remove.


unloadAll()

unloadAll(urls: Array)

Unloads each specified CSS file if no resources currently depend on it.

Parameters

  • urls (Array) - URLs to unload or remove.