Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: client/dom/src/_XMLHttpRequestUtils.dart

Issue 9464002: Implement automatically generated constructors for frog and dartium dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address code review comments Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 class _XMLHttpRequestUtils {
6
7 // Helper for factory XMLHttpRequest.getTEMPNAME
8 static XMLHttpRequest getTEMPNAME(String url,
9 onSuccess(XMLHttpRequest request)) {
10 final request = new XMLHttpRequest();
11 request.open('GET', url, true);
12
13 // TODO(terry): Validate after client login added if necessary to forward
14 // cookies to server.
15 request.withCredentials = true;
16
17 // Status 0 is for local XHR request.
18 request.on.readyStateChange.add((e) {
19 if (request.readyState == XMLHttpRequest.DONE &&
20 (request.status == 200 || request.status == 0)) {
21 onSuccess(request);
22 }
23 });
24
25 request.send();
26
27 return request;
28 }
29 }
OLDNEW
« no previous file with comments | « client/dom/scripts/systemhtml.py ('k') | client/dom/templates/html/dartium/factoryprovider.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698