| 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/collection', | 6 'dart/collection', |
| 7 'dart/async', | 7 'dart/async', |
| 8 'dart/_foreign_helper', | 8 'dart/_foreign_helper', |
| 9 'dart/isolate' | 9 'dart/isolate' |
| 10 ], /* Lazy imports */[ | 10 ], /* Lazy imports */[ |
| (...skipping 6172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6183 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; | 6183 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; |
| 6184 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; | 6184 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; |
| 6185 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; | 6185 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; |
| 6186 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; | 6186 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; |
| 6187 let parts = []; | 6187 let parts = []; |
| 6188 data.forEach(dart.fn((key, value) => { | 6188 data.forEach(dart.fn((key, value) => { |
| 6189 parts[dartx.add](`${core.Uri.encodeQueryComponent(key)}=` + `${core.Uri.
encodeQueryComponent(value)}`); | 6189 parts[dartx.add](`${core.Uri.encodeQueryComponent(key)}=` + `${core.Uri.
encodeQueryComponent(value)}`); |
| 6190 }, dart.void, [core.String, core.String])); | 6190 }, dart.void, [core.String, core.String])); |
| 6191 let formData = parts[dartx.join]('&'); | 6191 let formData = parts[dartx.join]('&'); |
| 6192 if (requestHeaders == null) { | 6192 if (requestHeaders == null) { |
| 6193 requestHeaders = dart.map(); | 6193 requestHeaders = dart.map({}, core.String, core.String); |
| 6194 } | 6194 } |
| 6195 requestHeaders.putIfAbsent('Content-Type', dart.fn(() => 'application/x-ww
w-form-urlencoded; charset=UTF-8', core.String, [])); | 6195 requestHeaders.putIfAbsent('Content-Type', dart.fn(() => 'application/x-ww
w-form-urlencoded; charset=UTF-8', core.String, [])); |
| 6196 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred
entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f
ormData, onProgress: onProgress}); | 6196 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred
entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f
ormData, onProgress: onProgress}); |
| 6197 } | 6197 } |
| 6198 static request(url, opts) { | 6198 static request(url, opts) { |
| 6199 let method = opts && 'method' in opts ? opts.method : null; | 6199 let method = opts && 'method' in opts ? opts.method : null; |
| 6200 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; | 6200 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent
ials : null; |
| 6201 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; | 6201 let responseType = opts && 'responseType' in opts ? opts.responseType : nu
ll; |
| 6202 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; | 6202 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; |
| 6203 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; | 6203 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader
s : null; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6260 static requestCrossOrigin(url, opts) { | 6260 static requestCrossOrigin(url, opts) { |
| 6261 let method = opts && 'method' in opts ? opts.method : null; | 6261 let method = opts && 'method' in opts ? opts.method : null; |
| 6262 let sendData = opts && 'sendData' in opts ? opts.sendData : null; | 6262 let sendData = opts && 'sendData' in opts ? opts.sendData : null; |
| 6263 if (dart.notNull(HttpRequest.supportsCrossOrigin)) { | 6263 if (dart.notNull(HttpRequest.supportsCrossOrigin)) { |
| 6264 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD
ata}).then(dart.fn(xhr => { | 6264 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD
ata}).then(dart.fn(xhr => { |
| 6265 return xhr.responseText; | 6265 return xhr.responseText; |
| 6266 }, dart.dynamic, [HttpRequest])), async.Future$(core.String)); | 6266 }, dart.dynamic, [HttpRequest])), async.Future$(core.String)); |
| 6267 } | 6267 } |
| 6268 } | 6268 } |
| 6269 get responseHeaders() { | 6269 get responseHeaders() { |
| 6270 let headers = dart.map(); | 6270 let headers = dart.map({}, core.String, core.String); |
| 6271 let headersString = this.getAllResponseHeaders(); | 6271 let headersString = this.getAllResponseHeaders(); |
| 6272 if (headersString == null) { | 6272 if (headersString == null) { |
| 6273 return headers; | 6273 return headers; |
| 6274 } | 6274 } |
| 6275 let headersList = headersString[dartx.split]('\r\n'); | 6275 let headersList = headersString[dartx.split]('\r\n'); |
| 6276 for (let header of headersList) { | 6276 for (let header of headersList) { |
| 6277 if (dart.notNull(header[dartx.isEmpty])) { | 6277 if (dart.notNull(header[dartx.isEmpty])) { |
| 6278 continue; | 6278 continue; |
| 6279 } | 6279 } |
| 6280 let splitIdx = header[dartx.indexOf](': '); | 6280 let splitIdx = header[dartx.indexOf](': '); |
| (...skipping 6592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12873 exports.ElementUpgrader = ElementUpgrader; | 12873 exports.ElementUpgrader = ElementUpgrader; |
| 12874 exports.NodeValidator = NodeValidator; | 12874 exports.NodeValidator = NodeValidator; |
| 12875 exports.NodeTreeSanitizer = NodeTreeSanitizer; | 12875 exports.NodeTreeSanitizer = NodeTreeSanitizer; |
| 12876 exports.UriPolicy = UriPolicy; | 12876 exports.UriPolicy = UriPolicy; |
| 12877 exports.spawnDomUri = spawnDomUri; | 12877 exports.spawnDomUri = spawnDomUri; |
| 12878 exports.unwrap_jso = unwrap_jso; | 12878 exports.unwrap_jso = unwrap_jso; |
| 12879 exports.wrap_jso = wrap_jso; | 12879 exports.wrap_jso = wrap_jso; |
| 12880 exports.createCustomUpgrader = createCustomUpgrader; | 12880 exports.createCustomUpgrader = createCustomUpgrader; |
| 12881 exports.getHtmlCreateFunction = getHtmlCreateFunction; | 12881 exports.getHtmlCreateFunction = getHtmlCreateFunction; |
| 12882 }); | 12882 }); |
| OLD | NEW |