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

Side by Side Diff: ios/web/web_state/js/resources/post_request.js

Issue 2449333002: [ios] Pass more --jscomp_error switches to the closure Compiler. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Provides a way to implement POST requests via XMLHttpRequest. 5 // Provides a way to implement POST requests via XMLHttpRequest.
6 // Works around https://bugs.webkit.org/show_bug.cgi?id=145410 on WKWebView. 6 // Works around https://bugs.webkit.org/show_bug.cgi?id=145410 on WKWebView.
7 7
8 'use strict'; 8 'use strict';
9 9
10 goog.provide('__crPostRequestWorkaround'); 10 goog.provide('__crPostRequestWorkaround');
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 request.send(blob); 69 request.send(blob);
70 if (request.status != 200) { 70 if (request.status != 200) {
71 throw request.status; 71 throw request.status;
72 } 72 }
73 return request.responseText; 73 return request.responseText;
74 } 74 }
75 75
76 document.open(); 76 document.open();
77 try { 77 try {
78 document.write(createAndSendPostRequest(url, headers, body, contentType)); 78 document.write(createAndSendPostRequest(url, headers, body, contentType));
79 window.webkit.messageHandlers.POSTSuccessHandler.postMessage(""); 79 window.webkit.messageHandlers['POSTSuccessHandler'].postMessage("");
dpapad 2016/10/26 17:05:24 Can you add externs definitions for those? Then yo
Eugene But (OOO till 7-30) 2016/10/26 17:54:45 I would prefer not to. messageHandlers is an objec
dpapad 2016/10/26 18:18:35 It is a tradeoff between inconvenience and better
Eugene But (OOO till 7-30) 2016/10/26 20:58:53 Acknowledged.
80 } catch(error) { 80 } catch(error) {
81 window.webkit.messageHandlers.POSTErrorHandler.postMessage(error); 81 window.webkit.messageHandlers['POSTErrorHandler'].postMessage(error);
82 } 82 }
83 document.close(); 83 document.close();
84 } 84 }
OLDNEW
« ios/web/web_state/js/resources/message.js ('K') | « ios/web/web_state/js/resources/message.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698