File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ 1.1.0 / 2017-6-7
2
+ ==================
3
+ * Handle <script > error event, thanks to @michaelvial
4
+
1
5
1.0.7 / 2017-5-25
2
6
==================
3
7
* support custom charset on script
Original file line number Diff line number Diff line change 79
79
jsonpScript . setAttribute ( 'charset' , options . charset ) ;
80
80
}
81
81
jsonpScript . id = scriptId ;
82
+ jsonpScript . onerror = function ( ) {
83
+ reject ( new Error ( 'JSONP request to ' + _url + ' failed' ) ) ;
84
+
85
+ clearFunction ( callbackFunction ) ;
86
+ removeScript ( scriptId ) ;
87
+ } ;
82
88
document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( jsonpScript ) ;
83
89
84
90
timeoutId = setTimeout ( function ( ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " fetch-jsonp" ,
3
- "version" : " 1.0.7 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " Fetch JSONP like a boss using Fetch API" ,
5
5
"main" : " build/fetch-jsonp.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments