Provides access to the OpenFin representation of the current code context (usually a document
such as a OpenFin.View or OpenFin.Window), as well as to the current Interop
context.
Useful for debugging in the devtools console, where this will intelligently type itself based on the context in which the devtools panel was opened.
Method to determine if the SnapshotSource has been initialized.
Use when the parent application is starting up to ensure the SnapshotSource is able to accept and apply a snapshot using the applySnapshot method.
let snapshotSource = fin.SnapshotSource.wrapSync(fin.me);
const snapshotProvider = {
async getSnapshot() { return 'foo' },
async applySnapshot(snapshot) {
console.log(snapshot);
return undefined;
}
}
await fin.SnapshotSource.init(snapshotProvider);
try {
await snapshotSource.ready();
await snapshotSource.applySnapshot('foo');
} catch (err) {
console.log(err)
}
Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.