Provides access to the OpenFin representation of the current code context (usually a document
such as a View or 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.
Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
Implementation-defined shape of an application snapshot. Allows custom snapshot implementations for legacy applications to define their own snapshot format.
const snapshotProvider = {
async getSnapshot() {
const bounds = await fin.me.getBounds();
return bounds;
},
async applySnapshot(snapshot) {
await fin.me.setBounds(snapshot);
return undefined;
}
}
await fin.SnapshotSource.init(snapshotProvider);
Asynchronously returns a SnapshotSource object that represents the current SnapshotSource.
const snapshotSource = await fin.SnapshotSource.wrap(fin.me);
// Use wrapped instance's getSnapshot method, e.g.:
const snapshot = await snapshotSource.getSnapshot();
Synchronously returns a SnapshotSource object that represents the current SnapshotSource.
const snapshotSource = fin.SnapshotSource.wrapSync(fin.me);
// Use wrapped instance's getSnapshot method, e.g.:
const snapshot = await snapshotSource.getSnapshot();
Static namespace for OpenFin API methods that interact with the SnapshotSource class, available under
fin.SnapshotSource
.