www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 69dec87aa6e1da3ff5554cab2551f00d27e96915
parent 4449da7e91c142eadef888096131f0880ef01419
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 17 Jul 2016 15:02:40 -0400

Allow passing arbitrary values to notifier events from DataObject.save()

item.saveTx({
    notifierData: {
        foo: 1
    }
});

foo: 1 will be included in the extraData[id] object in notify().

Diffstat:
Mchrome/content/zotero/xpcom/data/dataObject.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js @@ -830,6 +830,10 @@ Zotero.DataObject.prototype.save = Zotero.Promise.coroutine(function* (options) } env.notifierData = {}; + // Pass along any 'notifierData' values + if (env.options.notifierData) { + Object.assign(env.notifierData, env.options.notifierData); + } if (env.options.skipSelect) { env.notifierData.skipSelect = true; }