1
0
Fork 0
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:
Brendan Dahl 2012-07-27 15:19:43 -07:00
parent e4a75cf02d
commit 6d35073a9c
4 changed files with 113 additions and 3 deletions

View file

@ -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>

View file

@ -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