'textlayerrendered' event not alway fired when added by document.addEventListener
See original GitHub issueI have a code in my project like below:
document.addEventListener('textlayerrendered', function (e) {
var pageIndex = e.detail.pageNumber - 1;
var pageView = PDFViewerApplication.pdfViewer.getPageView(pageIndex);
console.log('text rendered', pageView );
[ below is my logic ]
}, true);
But problem is textlayerrendered
not alway fired, some times there’s no CONSOLE output; and [my logic] part don’t work at all, and no error reported in console. But after a fresh(F5), the event fired with no problem;
It’s hard to catch, about 2-5% chance to encounter this; Please confirm whether some thing went buggy? or it’s the problem of my network?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
addEventListener drop not firing - Stack Overflow
getEventListeners(document.getElementById('sub-main'));. But the drop event still does not fire. Any ideas?
Read more >JavaScript Event Listeners Ultimate Guide
The removeEventListener function is a simple function that you can call on an element to remove an event listener that was previously added...
Read more >viewer.js.map
initialRotation;\n }\n\n // Always let the browser history/document hash take ... into the browser history when the 'unload' event has already fired).
Read more >pdfjs-dist - UNPKG
n printing_not_ready: \"Warning: The PDF is not fully loaded for printing. ... an action always occurs, even when an event\n * arrives late...
Read more >Falcon Sandbox v8.30 © Hybrid Analysis
Not all malicious and suspicious indicators are displayed. Get your own cloud service or the full version to view all details.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
set “eventBusDispatchToDOM”: true in viewer.js why isn’t anyone telling this!
The provided JSBin is just the regular viewer in an
iframe
, so this does not display the problem. Since this issue was opened, there has been refactoring of the viewer events. Closing as incomplete until a clear example is provided that shows the problem.