Permalink
Browse files

adding minimal support to Internet Explorer 9 cors calls (only GET an…

…d POST verbs working)
  • Loading branch information...
felipevex committed Jun 7, 2017
1 parent dab5c62 commit ae7a5a76a900f3a3a0cc46460fc50e59dffa4b79
Showing with 28 additions and 6 deletions.
  1. +1 −0 priori.json
  2. +20 −6 priori/net/PriURLLoader.hx
  3. +7 −0 template/js/jquery.xdomainrequest.min.js
View
@@ -15,6 +15,7 @@
"<!--[if lt IE 9]> \n <script type=\"text/javascript\" src=\"js/html5shiv.min.js\"></script> \n <![endif]-->",
"<!--[if lt IE 9]> \n <script type=\"text/javascript\" src=\"js/respond.min.js\"></script> \n <![endif]-->",
"<script type=\"text/javascript\" src=\"js/jquery-2.2.1.min.js\"></script>",
"<script type=\"text/javascript\" src=\"js/jquery.xdomainrequest.min.js\"></script>",
"<link href=\"css/priori.css\" rel=\"stylesheet\">"
],
View
@@ -110,6 +110,8 @@ class PriURLLoader extends PriEventDispatcher {
success : this.onSuccess
};
JQuery.support.cors = true;
this.ajax = JQuery.ajax(ajaxObject);
}
@@ -119,9 +121,15 @@ class PriURLLoader extends PriEventDispatcher {
this._isLoaded = true;
this._isLoading = false;
this._responseHeaders = this.ajax.getAllResponseHeaders();
this.status = this.ajax.status;
this.statusText = this.ajax.statusText;
if (this.ajax == null) {
this._responseHeaders = "";
this.status = 200;
this.statusText = "success";
} else {
this._responseHeaders = this.ajax.getAllResponseHeaders();
this.status = this.ajax.status;
this.statusText = this.ajax.statusText;
}
this.data = data;
this.ajax = null;
@@ -133,9 +141,15 @@ class PriURLLoader extends PriEventDispatcher {
this._isLoaded = false;
this._isLoading = false;
this._responseHeaders = this.ajax.getAllResponseHeaders();
this.status = this.ajax.status;
this.statusText = this.ajax.statusText;
if (this.ajax == null) {
this._responseHeaders = "";
this.status = -1;
this.statusText = "undefined";
} else {
this._responseHeaders = this.ajax.getAllResponseHeaders();
this.status = this.ajax.status;
this.statusText = this.ajax.statusText;
}
this.data = data.responseText;
this.ajax = null;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit ae7a5a7

Please sign in to comment.