|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
545 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | "use strict";
|
|---|
| 2 | module.exports = require('./loader')(window, loadImplementation)
|
|---|
| 3 |
|
|---|
| 4 | /**
|
|---|
| 5 | * Browser specific loadImplementation. Always uses `window.Promise`
|
|---|
| 6 | *
|
|---|
| 7 | * To register a custom implementation, must register with `Promise` option.
|
|---|
| 8 | */
|
|---|
| 9 | function loadImplementation(){
|
|---|
| 10 | if(typeof window.Promise === 'undefined'){
|
|---|
| 11 | throw new Error("any-promise browser requires a polyfill or explicit registration"+
|
|---|
| 12 | " e.g: require('any-promise/register/bluebird')")
|
|---|
| 13 | }
|
|---|
| 14 | return {
|
|---|
| 15 | Promise: window.Promise,
|
|---|
| 16 | implementation: 'window.Promise'
|
|---|
| 17 | }
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.