Skip to main content

spawn_background

Function spawn_background 

Source
pub fn spawn_background(
    url: Url,
    content: impl Bundle,
    language_id: Option<String>,
    extra: impl Bundle,
) -> impl FnOnce(&mut World) -> Entity + 'static + Send + Sync
Expand description

Like spawn_or_insert, for documents the server loads in the background (LOV ontologies, owl:imports, configured ontologies and shapes).

If the user has a document with the same URL Open, their buffer is the source of truth: content is dropped and only extra is added. Without this guard a late fetch, or an owl:imports of a file being edited, would replace the editor’s text with the copy on disk.