restore: Add comment about get-data event.

This commit is contained in:
Renée Kooi 2017-12-18 10:44:10 +01:00
parent 3177ad415e
commit 8147ee0905
No known key found for this signature in database
GPG key ID: 30516CF2A8E63718

View file

@ -105,6 +105,9 @@ module.exports = class GoldenRetriever extends Plugin {
)
const pluginData = {}
// TODO Find a better way to do this?
// Other plugins can attach a restore:get-data listener that receives this callback.
// Plugins can then use this callback (sync) to provide data to be stored.
this.uppy.emit('restore:get-data', (data) => {
Object.assign(pluginData, data)
})