1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

Add preprocessor directives for the extension; and refactor FirefoxCom callback

This commit is contained in:
Yury Delendik 2014-05-28 10:21:58 -05:00
parent da93e65d8c
commit 68b037ffb0
2 changed files with 15 additions and 5 deletions

View file

@ -64,9 +64,12 @@ var FirefoxCom = (function FirefoxComClosure() {
document.documentElement.appendChild(request);
var sender = document.createEvent('CustomEvent');
sender.initCustomEvent('pdf.js.message', true, false,
{action: action, data: data, sync: false,
callback: callback});
sender.initCustomEvent('pdf.js.message', true, false, {
action: action,
data: data,
sync: false,
responseExpected: !!callback
});
return request.dispatchEvent(sender);
}
};