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

Side by Side Diff: ios/web/web_state/js/resources/core.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 2012 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 // This file adheres to closure-compiler conventions in order to enable
6 // compilation with ADVANCED_OPTIMIZATIONS. In particular, members that are to
7 // be accessed externally should be specified in this['style'] as opposed to
8 // this.style because member identifiers are minified by default.
9 // See http://goo.gl/FwOgy
10
11 goog.provide('__crWeb.core');
12
13 goog.require('__crWeb.common');
14 goog.require('__crWeb.message');
15
16 /* Beginning of anonymous object. */
17 (function() {
18 __gCrWeb['core'] = {};
19
20 // JavaScript errors are logged on the main application side. The handler is
21 // added ASAP to catch any errors in startup. Note this does not appear to
22 // work in iOS < 5.
23 window.addEventListener('error', function(event) {
24 // Sadly, event.filename and event.lineno are always 'undefined' and '0'
25 // with UIWebView.
26 __gCrWeb.message.invokeOnHost(
27 {'command': 'window.error', 'message': event.message.toString()});
28 });
29
30 // Flush the message queue.
31 if (__gCrWeb.message) {
32 __gCrWeb.message.invokeQueues();
33 }
34
35 }()); // End of anonymous object
OLDNEW
« no previous file with comments | « ios/web/web_state/js/common_js_unittest.mm ('k') | ios/web/web_state/js/resources/dialog_overrides.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698