Type Alias DocumentRef
Type Alias
Type Signature
type DocumentRef =
| { backend: "standalone"; document: string
| ArrayBuffer }
| { backend: "server"; documentId: string }
| { backend: "standalone"; document: string
| ArrayBuffer }
| { backend: "server"; documentId: string }
Identifies one document in a Events.DocumentSwapEvent, in the terms it was loaded with. NutrientViewer.Instance#load currently works in Standalone mode only, so every emitted value is the
standalonearm, holding thedocumentthe viewer was loaded with. Theserverarm is declared for Document Engine support, which is not available yet, and is never emitted.Narrow it on
backendbefore reading either field: