Skip to content

Commit

Permalink
use XMLHttpRequest first
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Jun 27, 2014
1 parent 8950a33 commit 88b7366
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seajs-text",
"version": "1.1.0",
"version": "1.1.1",
"description": "A Sea.js plugin for loading text resources such as template, json etc",
"keywords": ["seajs", "plugin", "text"],
"author": "Frank Wang <lifesinger@gmail.com>",
Expand Down
6 changes: 3 additions & 3 deletions src/seajs-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ function getPluginName(ext) {
}

function xhr(url, callback) {
var r = global.ActiveXObject ?
new global.ActiveXObject("Microsoft.XMLHTTP") :
new global.XMLHttpRequest()
var r = global.XMLHttpRequest ?
new global.XMLHttpRequest() :
new global.ActiveXObject("Microsoft.XMLHTTP")

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

Expand Down

1 comment on commit 88b7366

@army8735
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.