Commit 8d187151 authored by Robert Knight's avatar Robert Knight

Avoid manually including Promise everywhere that it is used

ES2015 polyfills have now been centralized in the polyfills.js
script.
parent acf67c31
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
"phantom": true, "phantom": true,
"jquery": true, "jquery": true,
"predef": [ "predef": [
"-Promise", // We currently support IE10-11 which lack a Promise global
"angular", "angular",
"assert", "assert",
"after", "after",
......
Promise = require('core-js/library/es6/promise')
{ {
FragmentAnchor FragmentAnchor
RangeAnchor RangeAnchor
......
Promise = require('core-js/library/es6/promise')
seek = require('dom-seek') seek = require('dom-seek')
Annotator = require('annotator') Annotator = require('annotator')
......
Promise = require('core-js/library/es6/promise')
baseURI = require('document-base-uri') baseURI = require('document-base-uri')
extend = require('extend') extend = require('extend')
raf = require('raf') raf = require('raf')
......
Promise = require('core-js/library/es6/promise')
extend = require('extend') extend = require('extend')
RPC = require('./frame-rpc') RPC = require('./frame-rpc')
......
/* jshint node: true */ /* jshint node: true */
'use strict'; 'use strict';
var Promise = require('core-js/library/es6/promise');
var proxyquire = require('proxyquire'); var proxyquire = require('proxyquire');
var events = require('../../events'); var events = require('../../events');
......
'use strict'; 'use strict';
var retry = require('retry'); var retry = require('retry');
var Promise = require('core-js/library/es6/promise');
/** /**
* Retry a Promise-returning operation until it succeeds or * Retry a Promise-returning operation until it succeeds or
......
'use strict'; 'use strict';
var assign = require('core-js/library/fn/object/assign');
var angular = require('angular'); var angular = require('angular');
var Promise = require('core-js/library/es6/promise');
var events = require('./events'); var events = require('./events');
var retryUtil = require('./retry-util'); var retryUtil = require('./retry-util');
...@@ -30,7 +28,7 @@ function sessionActions(options) { ...@@ -30,7 +28,7 @@ function sessionActions(options) {
}; };
Object.keys(actions).forEach(function (action) { Object.keys(actions).forEach(function (action) {
assign(actions[action], options); Object.assign(actions[action], options);
}); });
return actions; return actions;
......
'use strict'; 'use strict';
var Promise = require('core-js/library/es6/promise');
describe('annotationMapper', function() { describe('annotationMapper', function() {
var sandbox = sinon.sandbox.create(); var sandbox = sinon.sandbox.create();
var $rootScope; var $rootScope;
......
var Promise = require('core-js/library/es6/promise');
var retryUtil = require('../retry-util'); var retryUtil = require('../retry-util');
var toResult = require('./promise-util').toResult; var toResult = require('./promise-util').toResult;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment