| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,7 @@ define([ | |||
| 33 | 33 | ||
| 34 | 34 | iXHR = new HTMLHttpRequest(); | |
| 35 | 35 | ||
| 36 | - iXHR.open(iOption.type, iOption.url); | ||
| 36 | + iXHR.open(iOption.method, iOption.url); | ||
| 37 | 37 | ||
| 38 | 38 | iXHR.onload = iXHR.onerror = function () { | |
| 39 | 39 | ||
@@ -56,7 +56,7 @@ define([ | |||
| 56 | 56 | ||
| 57 | 57 | $.ajaxTransport('+script', $.proxy(HHR_Transport, $)); | |
| 58 | 58 | ||
| 59 | - if (! (BOM.XDomainRequest instanceof Function)) return; | ||
| 59 | + if (! ($.browser.msie < 10)) return; | ||
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | 62 | $.ajaxTransport('+*', function (iOption) { | |
@@ -75,7 +75,7 @@ define([ | |||
| 75 | 75 | ||
| 76 | 76 | iXHR = new BOM.XDomainRequest(); | |
| 77 | 77 | ||
| 78 | - iXHR.open(iOption.type, iOption.url, true); | ||
| 78 | + iXHR.open(iOption.method, iOption.url, true); | ||
| 79 | 79 | ||
| 80 | 80 | $.extend(iXHR, { | |
| 81 | 81 | timeout: iOption.timeout || 0, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,9 +12,9 @@ define(['../iQuery'], function ($) { | |||
| 12 | 12 | ||
| 13 | 13 | if (callback instanceof Array) { | |
| 14 | 14 | ||
| 15 | - queue = queue[type || '*'][0]; | ||
| 15 | + var handler = (queue[ type ] || queue['*'] || '')[0]; | ||
| 16 | 16 | ||
| 17 | - return queue && queue.apply(null, callback); | ||
| 17 | + return handler && handler.apply(null, callback); | ||
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | 20 | callback = callback || type; | |
@@ -42,7 +42,7 @@ define(['../iQuery'], function ($) { | |||
| 42 | 42 | ||
| 43 | 43 | iXHR = new self.XMLHttpRequest(); | |
| 44 | 44 | ||
| 45 | - iXHR.open(iOption.type, iOption.url, true); | ||
| 45 | + iXHR.open(iOption.method, iOption.url, true); | ||
| 46 | 46 | ||
| 47 | 47 | iXHR[iOption.crossDomain ? 'onload' : 'onreadystatechange'] = | |
| 48 | 48 | function () { | |
@@ -87,6 +87,7 @@ define(['../iQuery'], function ($) { | |||
| 87 | 87 | iXHR.send(iData); | |
| 88 | 88 | }, | |
| 89 | 89 | abort: function () { | |
| 90 | + | ||
| 90 | 91 | iXHR.onload = iXHR.onreadystatechange = null; | |
| 91 | 92 | ||
| 92 | 93 | iXHR.abort(); iXHR = null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,7 +67,7 @@ define([ | |||
| 67 | 67 | /* ---------- Request Core ---------- */ | |
| 68 | 68 | ||
| 69 | 69 | var Default_Option = { | |
| 70 | - type: 'GET', | ||
| 70 | + method: 'GET', | ||
| 71 | 71 | dataType: 'text' | |
| 72 | 72 | }, | |
| 73 | 73 | $_DOM = $( self.document ); | |
@@ -103,6 +103,8 @@ define([ | |||
| 103 | 103 | var _Option_ = $.extend( | |
| 104 | 104 | {url: self.location.href}, Default_Option, iOption | |
| 105 | 105 | ); | |
| 106 | + _Option_.method = (_Option_.type || _Option_.method).toUpperCase(); | ||
| 107 | + | ||
| 106 | 108 | iURL = _Option_.url; | |
| 107 | 109 | ||
| 108 | 110 | _Option_.crossDomain = $.isXDomain( iURL ); | |
@@ -114,22 +116,24 @@ define([ | |||
| 114 | 116 | return ''; | |
| 115 | 117 | }); | |
| 116 | 118 | ||
| 117 | - if (_Option_.type == 'GET') { | ||
| 119 | + if (_Option_.method === 'GET') { | ||
| 118 | 120 | ||
| 119 | 121 | if (! (_Option_.jsonp || hasFetched( iURL ))) | |
| 120 | 122 | _Option_.data._ = $.now(); | |
| 121 | 123 | ||
| 122 | 124 | _Option_.data = $.extend($.paramJSON( iURL ), _Option_.data); | |
| 123 | 125 | ||
| 124 | 126 | _Option_.url = $.extendURL(iURL, _Option_.data); | |
| 127 | + | ||
| 128 | + _Option_.data = ''; | ||
| 125 | 129 | } | |
| 126 | 130 | ||
| 127 | 131 | // Prefilter & Transport | |
| 128 | - var iXHR = new self.XMLHttpRequest(), iArgs = [_Option_, iOption, iXHR]; | ||
| 132 | + var iArgs = [_Option_, iOption, iXHR]; | ||
| 129 | 133 | ||
| 130 | 134 | $.ajaxPrefilter(_Option_.dataType, iArgs); | |
| 131 | 135 | ||
| 132 | - iXHR = $.ajaxTransport(_Option_.dataType, iArgs) || iXHR; | ||
| 136 | + var iXHR = $.ajaxTransport(_Option_.dataType, iArgs); | ||
| 133 | 137 | ||
| 134 | 138 | // Async Promise | |
| 135 | 139 | var iResult = new Promise(function (iResolve, iReject) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,9 +46,9 @@ define(['../object/index'], function ($) { | |||
| 46 | 46 | .slice(-1)[0]; | |
| 47 | 47 | } | |
| 48 | 48 | ||
| 49 | - return Array.from(iNew.childNodes, function (iDOM) { | ||
| 49 | + return $.each($.makeArray( iNew.childNodes ), function () { | ||
| 50 | 50 | ||
| 51 | - return iDOM.parentNode.removeChild( iDOM ); | ||
| 51 | + return this.parentNode.removeChild( this ); | ||
| 52 | 52 | }); | |
| 53 | 53 | }; | |
| 54 | 54 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ define(['../iQuery', '../CSS/ext/pseudo'], function ($) { | |||
| 47 | 47 | function Scroll_DOM() { | |
| 48 | 48 | ||
| 49 | 49 | return (this.nodeName.toLowerCase() in Scroll_Root) ? | |
| 50 | - DOM.scrollingElement : this; | ||
| 50 | + document.scrollingElement : this; | ||
| 51 | 51 | } | |
| 52 | 52 | ||
| 53 | 53 | function DOM_Scroll(iName) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,9 +90,9 @@ define([ | |||
| 90 | 90 | var result; event = Event(event, {currentTarget: this}); | |
| 91 | 91 | ||
| 92 | 92 | $.each( | |
| 93 | - $.event.handlers.call( | ||
| 94 | - this, event, $.data(this, '__event__'), namespace | ||
| 95 | - ), | ||
| 93 | + $.event.handlers.apply(this, [ | ||
| 94 | + event, $.data(this, '__event__')[ event.type ], namespace | ||
| 95 | + ]), | ||
| 96 | 96 | function () { | |
| 97 | 97 | ||
| 98 | 98 | for (var i = 0; this.handler[i]; i++) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments