|
|
@ -9,13 +9,14 @@ |
|
|
|
|
|
|
|
'use strict'; |
|
|
|
|
|
|
|
export default url => new Promise((resolve, reject) => |
|
|
|
document.head.appendChild( |
|
|
|
Object.assign(document.createElement('script'), { |
|
|
|
async: true, |
|
|
|
src: url, |
|
|
|
onload: resolve, |
|
|
|
onerror: reject |
|
|
|
}) |
|
|
|
) |
|
|
|
); |
|
|
|
export default url => |
|
|
|
new Promise((resolve, reject) => |
|
|
|
document.head.appendChild( |
|
|
|
Object.assign(document.createElement('script'), { |
|
|
|
async: true, |
|
|
|
src: url, |
|
|
|
onload: resolve, |
|
|
|
onerror: reject, |
|
|
|
}), |
|
|
|
), |
|
|
|
); |
|
|
|