OLD | NEW |
1 <import src="/mojo/public/sky/core.sky" as="core" /> | 1 <import src="/mojo/public/sky/core.sky" as="core" /> |
2 <import src="/mojo/public/sky/unicode.sky" as="unicode" /> | 2 <import src="/mojo/public/sky/unicode.sky" as="unicode" /> |
3 <import src="/mojo/services/public/interfaces/network/network_service.mojom.sky"
as="net" /> | 3 <import src="/mojo/services/network/public/interfaces/network_service.mojom.sky"
as="net" /> |
4 <import src="/mojo/services/public/interfaces/network/url_loader.mojom.sky" as="
loader" /> | 4 <import src="/mojo/services/network/public/interfaces/url_loader.mojom.sky" as="
loader" /> |
5 <import src="shell.sky" as="shell" /> | 5 <import src="shell.sky" as="shell" /> |
6 <script> | 6 <script> |
7 // XHR keeps itself alive. | 7 // XHR keeps itself alive. |
8 var outstandingRequests = new Set(); | 8 var outstandingRequests = new Set(); |
9 | 9 |
10 const kPrivate = Symbol("XMLHttpRequestPrivate"); | 10 const kPrivate = Symbol("XMLHttpRequestPrivate"); |
11 | 11 |
12 class Private { | 12 class Private { |
13 constructor() { | 13 constructor() { |
14 this.networkService = shell.connectToService( | 14 this.networkService = shell.connectToService( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 }); | 73 }); |
74 }).catch(function(error) { | 74 }).catch(function(error) { |
75 outstandingRequests.delete(self); | 75 outstandingRequests.delete(self); |
76 self.onerror(error); | 76 self.onerror(error); |
77 }); | 77 }); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 module.exports = XMLHttpRequest; | 81 module.exports = XMLHttpRequest; |
82 </script> | 82 </script> |
OLD | NEW |