1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

presentation

This commit is contained in:
Fred Chasen 2012-10-27 17:16:15 -07:00
parent 855308972a
commit 7ff7216500
4 changed files with 209 additions and 297 deletions

View file

@ -1,4 +1,23 @@
FP.namespace('core').load = (function(){
function load(url, callback){
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
if (this.status == 200) {
// Note: .response instead of .responseText
var blob = new Blob([this.response], {type: 'application/xhtml+xml'});
callback(blob);
}
};
xhr.send();
}
return load;
})();
FP.namespace('core').load2 = (function(){
/*
PDFJS.getPdf(