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

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

Issue 2817943002: Fully deprecate core.js. Moved last method to error.js. (Closed)
Patch Set: Tweak language Created 3 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Error handling APIs and listeners.
7 */
8
9 goog.provide('__crWeb.error');
10
11 goog.require('__crWeb.message');
12
13 /** Beginning of anonymouse object */
14 (function() {
15
16 /**
17 * JavaScript errors are logged on the main application side. The handler is
18 * added ASAP to catch any errors in startup.
19 */
20 window.addEventListener('error', function(event) {
21 // Sadly, event.filename and event.lineno are always 'undefined' and '0'
22 // with UIWebView.
23 // TODO(crbug.com/711359): the aforementioned APIs may be working now in
24 // WKWebView. Evaluate any cleanup / improvement we can do here.
25 __gCrWeb.message.invokeOnHost(
26 {'command': 'window.error', 'message': event.message.toString()});
27 });
28
29 // Flush the message queue.
30 if (__gCrWeb.message) {
31 __gCrWeb.message.invokeQueues();
32 }
33
34 }()); // End of anonymous object
OLDNEW
« no previous file with comments | « ios/web/web_state/js/resources/dialog_overrides.js ('k') | ios/web/web_state/js/resources/web_bundle.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698