| OLD | NEW |
| 1 dart_library.library('dart/html', null, /* Imports */[ | 1 dart_library.library('dart/html', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'dart/math', | 3 'dart/math', |
| 4 'dart/core', | 4 'dart/core', |
| 5 'dart/_js_helper', | 5 'dart/_js_helper', |
| 6 'dart/async', | 6 'dart/async', |
| 7 'dart/collection', | 7 'dart/collection', |
| 8 'dart/_foreign_helper', | 8 'dart/_foreign_helper', |
| 9 'dart/isolate' | 9 'dart/isolate' |
| 10 ], /* Lazy imports */[ | 10 ], /* Lazy imports */[ |
| (...skipping 6082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6093 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; | 6093 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; |
| 6094 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; | 6094 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; |
| 6095 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; | 6095 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; |
| 6096 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; | 6096 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; |
| 6097 let parts = []; | 6097 let parts = []; |
| 6098 data.forEach(dart.fn((key, value) => { | 6098 data.forEach(dart.fn((key, value) => { |
| 6099 parts[dartx.add](`${core.Uri.encodeQueryComponent(key)}=` + `${core.Uri.
encodeQueryComponent(value)}`); | 6099 parts[dartx.add](`${core.Uri.encodeQueryComponent(key)}=` + `${core.Uri.
encodeQueryComponent(value)}`); |
| 6100 }, dart.void, [core.String, core.String])); | 6100 }, dart.void, [core.String, core.String])); |
| 6101 let formData = parts[dartx.join]('&'); | 6101 let formData = parts[dartx.join]('&'); |
| 6102 if (requestHeaders == null) { | 6102 if (requestHeaders == null) { |
| 6103 requestHeaders = dart.map(); | 6103 requestHeaders = dart.map({}, core.String, core.String); |
| 6104 } | 6104 } |
| 6105 requestHeaders.putIfAbsent('Content-Type', dart.fn(() => 'application/x-ww
w-form-urlencoded; charset=UTF-8', core.String, [])); | 6105 requestHeaders.putIfAbsent('Content-Type', dart.fn(() => 'application/x-ww
w-form-urlencoded; charset=UTF-8', core.String, [])); |
| 6106 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred
entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f
ormData, onProgress: onProgress}); | 6106 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred
entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f
ormData, onProgress: onProgress}); |
| 6107 } | 6107 } |
| 6108 static request(url, opts) { | 6108 static request(url, opts) { |
| 6109 let method = opts && 'method' in opts ? opts.method : null; | 6109 let method = opts && 'method' in opts ? opts.method : null; |
| 6110 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; | 6110 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; |
| 6111 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; | 6111 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; |
| 6112 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; | 6112 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; |
| 6113 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; | 6113 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6170 static requestCrossOrigin(url, opts) { | 6170 static requestCrossOrigin(url, opts) { |
| 6171 let method = opts && 'method' in opts ? opts.method : null; | 6171 let method = opts && 'method' in opts ? opts.method : null; |
| 6172 let sendData = opts && 'sendData' in opts ? opts.sendData : null; | 6172 let sendData = opts && 'sendData' in opts ? opts.sendData : null; |
| 6173 if (dart.notNull(HttpRequest.supportsCrossOrigin)) { | 6173 if (dart.notNull(HttpRequest.supportsCrossOrigin)) { |
| 6174 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD
ata}).then(dart.fn(xhr => { | 6174 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD
ata}).then(dart.fn(xhr => { |
| 6175 return xhr.responseText; | 6175 return xhr.responseText; |
| 6176 }, dart.dynamic, [HttpRequest])), async.Future$(core.String)); | 6176 }, dart.dynamic, [HttpRequest])), async.Future$(core.String)); |
| 6177 } | 6177 } |
| 6178 } | 6178 } |
| 6179 get responseHeaders() { | 6179 get responseHeaders() { |
| 6180 let headers = dart.map(); | 6180 let headers = dart.map({}, core.String, core.String); |
| 6181 let headersString = this.getAllResponseHeaders(); | 6181 let headersString = this.getAllResponseHeaders(); |
| 6182 if (headersString == null) { | 6182 if (headersString == null) { |
| 6183 return headers; | 6183 return headers; |
| 6184 } | 6184 } |
| 6185 let headersList = headersString[dartx.split]('\r\n'); | 6185 let headersList = headersString[dartx.split]('\r\n'); |
| 6186 for (let header of headersList) { | 6186 for (let header of headersList) { |
| 6187 if (dart.notNull(header[dartx.isEmpty])) { | 6187 if (dart.notNull(header[dartx.isEmpty])) { |
| 6188 continue; | 6188 continue; |
| 6189 } | 6189 } |
| 6190 let splitIdx = header[dartx.indexOf](': '); | 6190 let splitIdx = header[dartx.indexOf](': '); |
| (...skipping 6516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12707 exports.ElementUpgrader = ElementUpgrader; | 12707 exports.ElementUpgrader = ElementUpgrader; |
| 12708 exports.NodeValidator = NodeValidator; | 12708 exports.NodeValidator = NodeValidator; |
| 12709 exports.NodeTreeSanitizer = NodeTreeSanitizer; | 12709 exports.NodeTreeSanitizer = NodeTreeSanitizer; |
| 12710 exports.UriPolicy = UriPolicy; | 12710 exports.UriPolicy = UriPolicy; |
| 12711 exports.spawnDomUri = spawnDomUri; | 12711 exports.spawnDomUri = spawnDomUri; |
| 12712 exports.unwrap_jso = unwrap_jso; | 12712 exports.unwrap_jso = unwrap_jso; |
| 12713 exports.wrap_jso = wrap_jso; | 12713 exports.wrap_jso = wrap_jso; |
| 12714 exports.createCustomUpgrader = createCustomUpgrader; | 12714 exports.createCustomUpgrader = createCustomUpgrader; |
| 12715 exports.getHtmlCreateFunction = getHtmlCreateFunction; | 12715 exports.getHtmlCreateFunction = getHtmlCreateFunction; |
| 12716 }); | 12716 }); |
| OLD | NEW |