Skip to content

Commit 88b7366

Browse files
committedJun 27, 2014
use XMLHttpRequest first
1 parent 8950a33 commit 88b7366

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "seajs-text",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "A Sea.js plugin for loading text resources such as template, json etc",
55
"keywords": ["seajs", "plugin", "text"],
66
"author": "Frank Wang <lifesinger@gmail.com>",

‎src/seajs-text.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ function getPluginName(ext) {
122122
}
123123

124124
function xhr(url, callback) {
125-
var r = global.ActiveXObject ?
126-
new global.ActiveXObject("Microsoft.XMLHTTP") :
127-
new global.XMLHttpRequest()
125+
var r = global.XMLHttpRequest ?
126+
new global.XMLHttpRequest() :
127+
new global.ActiveXObject("Microsoft.XMLHTTP")
128128

129129
r.open("GET", url, true)
130130

1 commit comments

Comments
 (1)

army8735 commented on Jun 27, 2014

@army8735
MemberAuthor
Please sign in to comment.