-
Notifications
You must be signed in to change notification settings - Fork 328
Why not throw an Error when script onerror? #45
Open
Description
when script error, throw an error in advance instead of waitting the callback in timer
script = document.createElement('script');
script.src = url;
// add onerror
script.onerror = function() {
cleanup();
if (fn) fn(new Error('Failure'));
}
target.parentNode.insertBefore(script, target);
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.