mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Name a few anonymous functions.
Also rename some functions.
This commit is contained in:
parent
d7c2e79cb8
commit
7e762169cf
3 changed files with 11 additions and 11 deletions
|
@ -197,7 +197,7 @@ function isPDFFunction(v) {
|
|||
* can be set. If any of these happens twice or the data is required before
|
||||
* it was set, an exception is throw.
|
||||
*/
|
||||
var Promise = (function() {
|
||||
var Promise = (function promise() {
|
||||
var EMPTY_PROMISE = {};
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,7 @@ var Promise = (function() {
|
|||
return this._data;
|
||||
},
|
||||
|
||||
onData: function(callback) {
|
||||
onData: function promiseOnData(callback) {
|
||||
if (this._data !== EMPTY_PROMISE) {
|
||||
callback(this._data);
|
||||
} else {
|
||||
|
@ -252,7 +252,7 @@ var Promise = (function() {
|
|||
}
|
||||
},
|
||||
|
||||
resolve: function(data) {
|
||||
resolve: function promiseResolve(data) {
|
||||
if (this.isResolved) {
|
||||
throw 'A Promise can be resolved only once ' + this.name;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ var Promise = (function() {
|
|||
}
|
||||
},
|
||||
|
||||
then: function(callback) {
|
||||
then: function promiseThen(callback) {
|
||||
if (!callback) {
|
||||
throw 'Requiring callback' + this.name;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue