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:
parent
da93e65d8c
commit
68b037ffb0
2 changed files with 15 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue