mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Switch to Native Promises, add polyfills.js in dist folder
This commit is contained in:
parent
a4e76029d4
commit
151dc97d19
28 changed files with 677 additions and 3049 deletions
|
@ -1,4 +1,3 @@
|
|||
var RSVP = require('rsvp');
|
||||
var EventEmitter = require('event-emitter');
|
||||
var core = require('./core');
|
||||
var EpubCFI = require('./epubcfi');
|
||||
|
@ -406,7 +405,7 @@ Contents.prototype.locationOf = function(target, ignoreClass) {
|
|||
};
|
||||
|
||||
Contents.prototype.addStylesheet = function(src) {
|
||||
return new RSVP.Promise(function(resolve, reject){
|
||||
return new Promise(function(resolve, reject){
|
||||
var $stylesheet;
|
||||
var ready = false;
|
||||
|
||||
|
@ -469,7 +468,7 @@ Contents.prototype.addStylesheetRules = function(rules) {
|
|||
|
||||
Contents.prototype.addScript = function(src) {
|
||||
|
||||
return new RSVP.Promise(function(resolve, reject){
|
||||
return new Promise(function(resolve, reject){
|
||||
var $script;
|
||||
var ready = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue