Nutrient Web SDK

ReferenceEventsDocumentSwapEvent

Interface DocumentSwapEvent

This event is emitted when one document replaces another in a mounted viewer, via NutrientViewer.Instance#load. Since the instance is preserved across the switch, its identity cannot signal that the document changed, so this payload is how a handler tells the documents apart.

Interface

Properties

The document being switched to, as it was requested.

The document that was open when the switch started.

Always present: these events are emitted only when one document replaces another, never for the initial NutrientViewer.load.