mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(cloudcmd) createScript
This commit is contained in:
parent
da2768d56b
commit
b28e45af25
1 changed files with 4 additions and 5 deletions
|
|
@ -61,11 +61,10 @@ var CloudCmd;
|
|||
script.src = url;
|
||||
script.async = true;
|
||||
|
||||
if (callback)
|
||||
script.addEventListener('load', function(event) {
|
||||
callback(event);
|
||||
script.removeEventListener('load', callback);
|
||||
});
|
||||
script.addEventListener('load', function(event) {
|
||||
callback(event);
|
||||
script.removeEventListener('load', callback);
|
||||
});
|
||||
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue