clear declarations
This commit is contained in:
parent
9b03ee79bd
commit
49fbecca83
2 changed files with 0 additions and 31 deletions
|
@ -1,16 +1,4 @@
|
|||
<script>
|
||||
function loadScript(src) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
let script = document.createElement('script');
|
||||
script.src = src;
|
||||
|
||||
script.onload = () => resolve(script);
|
||||
script.onerror = () => reject(new Error("Script load error: " + src));
|
||||
|
||||
document.head.append(script);
|
||||
});
|
||||
}
|
||||
|
||||
class HttpError extends Error {
|
||||
constructor(response) {
|
||||
super(`${response.status} for ${response.url}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue