Bundled output for commit ad8f7b6f2c [skip ci]

This commit is contained in:
Gandalf-the-Bot 2016-12-30 12:21:08 +00:00
parent ad8f7b6f2c
commit 81a540ae41
3 changed files with 46 additions and 45 deletions

View file

@ -232,7 +232,6 @@ var _8 = function($window, Promise) {
}
return args
}
function request(args, extra) {
var finalize = finalizer()
args = normalize(args, extra)
@ -255,6 +254,9 @@ var _8 = function($window, Promise) {
xhr.setRequestHeader("Accept", "application/json, text/*")
}
if (args.withCredentials) xhr.withCredentials = args.withCredentials
for (var key in args.headers) if ({}.hasOwnProperty.call(args.headers, key)) {
xhr.setRequestHeader(key, args.headers[key])
}
if (typeof args.config === "function") xhr = args.config(xhr, args) || xhr
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
@ -282,7 +284,6 @@ var _8 = function($window, Promise) {
function jsonp(args, extra) {
var finalize = finalizer()
args = normalize(args, extra)
var promise0 = new Promise(function(resolve, reject) {
var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++
var script = $window.document.createElement("script")