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

Side by Side Diff: components/autofill/ios/browser/resources/suggestion_controller.js

Issue 2242353002: [ios] Put autofill scripts into anonymous function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « components/autofill/ios/browser/resources/autofill_controller.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Installs suggestion management functions on the |__gCrWeb| object. 5 // Installs suggestion management functions on the |__gCrWeb| object.
6 6
7 /* Beginning of anonymous object. */
8 (function() {
9
7 /** 10 /**
8 * Namespace for this file. It depends on |__gCrWeb| having already been 11 * Namespace for this file. It depends on |__gCrWeb| having already been
9 * injected. 12 * injected.
10 */ 13 */
11 __gCrWeb['suggestion'] = {}; 14 __gCrWeb['suggestion'] = {};
12 15
13 /** 16 /**
14 * Returns the first element in |elements| that is later than |elementToCompare| 17 * Returns the first element in |elements| that is later than |elementToCompare|
15 * in tab order. 18 * in tab order.
16 * 19 *
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 * @return {boolean} Whether there is an element in the sequential navigation 309 * @return {boolean} Whether there is an element in the sequential navigation
307 * before the currently active element. 310 * before the currently active element.
308 */ 311 */
309 __gCrWeb.suggestion['hasPreviousElement'] = function(formName, fieldName) { 312 __gCrWeb.suggestion['hasPreviousElement'] = function(formName, fieldName) {
310 var currentElement = 313 var currentElement =
311 formName ? __gCrWeb.suggestion.getFormElement(formName, fieldName) : 314 formName ? __gCrWeb.suggestion.getFormElement(formName, fieldName) :
312 document.activeElement; 315 document.activeElement;
313 return __gCrWeb.suggestion.getPreviousElementInTabOrder( 316 return __gCrWeb.suggestion.getPreviousElementInTabOrder(
314 currentElement, document.all) !== null; 317 currentElement, document.all) !== null;
315 }; 318 };
319
320 }()); // End of anonymous object
OLDNEW
« no previous file with comments | « components/autofill/ios/browser/resources/autofill_controller.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698