mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
presentation
This commit is contained in:
parent
855308972a
commit
7ff7216500
4 changed files with 209 additions and 297 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue