OptionalonObjectLoaded: (object: WhiteboardObject) => voidOptionalopts: { preserveBackground?: boolean }OptionalpreserveBackground?: boolean— capture canvas.backgroundImage /
backgroundColor before the load and re-apply them after. Fabric's
loadFromJSON clears the background as a side effect, and canvas
payloads never carry it (backgrounds sync via their own channel).
Use for whole-canvas replacements on a canvas whose background must
survive (peer undo/redo). Leave OFF for file loads — switching files
relies on the load wiping the previous file's background.
A LoadCanvasResult — droppedCount > 0 signals the caller
should mark the file unsaved (or trigger save) to rewrite it clean.
Load canvas from JSON data.
Tolerates empty and partially-malformed inputs:
null/undefined/non-object → resolves with an empty canvas (no throw).objectsmissing or empty → renders an empty canvas.typeare dropped up-front (salvage pass).