Refactors PDFFindBar and FirefoxCom find events.

This commit is contained in:
Yury Delendik 2016-04-28 07:11:40 -05:00
parent 7fd3db9977
commit 3e6e294fd4
4 changed files with 48 additions and 19 deletions

View file

@ -83,6 +83,9 @@
e.source.container.dispatchEvent(event);
});
eventBus.on('find', function (e) {
if (e.source === window) {
return; // event comes from FirefoxCom, no need to replicate
}
var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + e.type, true, true, {
query: e.query,