mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
Initial build for b2g.
This commit is contained in:
parent
e4a75cf02d
commit
6d35073a9c
4 changed files with 113 additions and 3 deletions
|
@ -38,6 +38,7 @@
|
|||
<script type="text/javascript" src="../src/jbig2.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
|
||||
<script type="text/javascript" src="../src/bidi.js"></script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
|
||||
<script type="text/javascript">PDFJS.workerSrc = '../src/worker_loader.js';</script> <!-- PDFJSSCRIPT_REMOVE_CORE -->
|
||||
<!-- PDFJSSCRIPT_INCLUDE_B2G -->
|
||||
<script type="text/javascript" src="debugger.js"></script>
|
||||
<script type="text/javascript" src="viewer.js"></script>
|
||||
</head>
|
||||
|
|
|
@ -1880,8 +1880,9 @@ window.addEventListener('load', function webViewerLoad(evt) {
|
|||
PDFView.sidebarOpen = outerContainer.classList.contains('sidebarOpen');
|
||||
PDFView.renderHighestPriority();
|
||||
});
|
||||
|
||||
//#if !B2G
|
||||
PDFView.open(file, 0);
|
||||
//#endif
|
||||
}, true);
|
||||
|
||||
function updateViewarea() {
|
||||
|
@ -2140,3 +2141,21 @@ window.addEventListener('afterprint', function afterPrint(evt) {
|
|||
window.addEventListener('mozfullscreenchange', fullscreenChange, false);
|
||||
window.addEventListener('webkitfullscreenchange', fullscreenChange, false);
|
||||
})();
|
||||
|
||||
//#if B2G
|
||||
// window.navigator.mozSetMessageHandler('activity', function(activity) {
|
||||
// var url = activity.source.data.url;
|
||||
// // Temporarily get the data here since the cross domain xhr is broken in
|
||||
// // the worker currently, see bug 761227.
|
||||
// var params = {
|
||||
// url: url,
|
||||
// error: function(e) {
|
||||
// PDFView.error(mozL10n.get('loading_error', null,
|
||||
// 'An error occurred while loading the PDF.'), e);
|
||||
// }
|
||||
// };
|
||||
// PDFJS.getPdf(params, function successCallback(data) {
|
||||
// PDFView.open(data, 0);
|
||||
// });
|
||||
// });
|
||||
//#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue