@@ -30,14 +30,14 @@ clientSideScripts.waitForAngular = function() {
30
30
/**
31
31
* Find a list of elements in the page by their angular binding.
32
32
*
33
- * arguments[0] {Element } The scope of the search .
34
- * arguments[1] {string } The binding, e.g. {{cat.name}} .
33
+ * arguments[0] {string } The binding, e.g. {{cat.name}} .
34
+ * arguments[1] {Element } The scope of the search .
35
35
*
36
36
* @return {Array.<Element> } The elements containing the binding.
37
37
*/
38
38
clientSideScripts . findBindings = function ( ) {
39
- var using = arguments [ 0 ] || document ;
40
- var binding = arguments [ 1 ] ;
39
+ var binding = arguments [ 0 ] ;
40
+ var using = arguments [ 1 ] || document ;
41
41
var bindings = using . getElementsByClassName ( 'ng-binding' ) ;
42
42
var matches = [ ] ;
43
43
for ( var i = 0 ; i < bindings . length ; ++ i ) {
@@ -57,17 +57,17 @@ clientSideScripts.findBindings = function() {
57
57
* Always returns an array of only one element for plain old ng-repeat.
58
58
* Returns an array of all the elements in one segment for ng-repeat-start.
59
59
*
60
- * arguments[0] {Element } The scope of the search .
61
- * arguments[1] {string } The text of the repeater, e.g. 'cat in cats' .
62
- * arguments[2] {number } The row index .
60
+ * arguments[0] {string } The text of the repeater, e.g. 'cat in cats' .
61
+ * arguments[1] {number } The row index .
62
+ * arguments[2] {Element } The scope of the search .
63
63
*
64
64
* @return {Array.<Element> } The row of the repeater, or an array of elements
65
65
* in the first row in the case of ng-repeat-start.
66
66
*/
67
67
clientSideScripts . findRepeaterRows = function ( ) {
68
- var using = arguments [ 0 ] || document ;
69
- var repeater = arguments [ 1 ] ;
70
- var index = arguments [ 2 ] ;
68
+ var repeater = arguments [ 0 ] ;
69
+ var index = arguments [ 1 ] ;
70
+ var using = arguments [ 2 ] || document ;
71
71
72
72
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
73
73
var rows = [ ] ;
@@ -109,14 +109,14 @@ clientSideScripts.findBindings = function() {
109
109
/**
110
110
* Find all rows of an ng-repeat.
111
111
*
112
- * arguments[0] {Element } The scope of the search .
113
- * arguments[1] {string } The text of the repeater, e.g. 'cat in cats' .
112
+ * arguments[0] {string } The text of the repeater, e.g. 'cat in cats' .
113
+ * arguments[1] {Element } The scope of the search .
114
114
*
115
115
* @return {Array.<Element> } All rows of the repeater.
116
116
*/
117
117
clientSideScripts . findAllRepeaterRows = function ( ) {
118
- var using = arguments [ 0 ] || document ;
119
- var repeater = arguments [ 1 ] ;
118
+ var repeater = arguments [ 0 ] ;
119
+ var using = arguments [ 1 ] || document ;
120
120
121
121
var rows = [ ] ;
122
122
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
@@ -152,19 +152,19 @@ clientSideScripts.findBindings = function() {
152
152
/**
153
153
* Find an element within an ng-repeat by its row and column.
154
154
*
155
- * arguments[0] {Element } The scope of the search .
156
- * arguments[1] {string } The text of the repeater, e.g. 'cat in cats' .
157
- * arguments[2] {number } The row index .
158
- * arguments[3] {string } The column binding, e.g. '{{cat.name}}' .
155
+ * arguments[0] {string } The text of the repeater, e.g. 'cat in cats' .
156
+ * arguments[1] {number } The row index .
157
+ * arguments[2] {string } The column binding, e.g. '{{cat.name}}' .
158
+ * arguments[3] {Element } The scope of the search .
159
159
*
160
160
* @return {Array.<Element> } The element in an array.
161
161
*/
162
162
clientSideScripts . findRepeaterElement = function ( ) {
163
163
var matches = [ ] ;
164
- var using = arguments [ 0 ] || document ;
165
- var repeater = arguments [ 1 ] ;
166
- var index = arguments [ 2 ] ;
167
- var binding = arguments [ 3 ] ;
164
+ var repeater = arguments [ 0 ] ;
165
+ var index = arguments [ 1 ] ;
166
+ var binding = arguments [ 2 ] ;
167
+ var using = arguments [ 3 ] || document ;
168
168
169
169
var rows = [ ] ;
170
170
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
@@ -239,17 +239,17 @@ clientSideScripts.findRepeaterElement = function() {
239
239
/**
240
240
* Find the elements in a column of an ng-repeat.
241
241
*
242
- * arguments[0] {Element } The scope of the search .
243
- * arguments[1] {string} The text of the repeater , e.g. 'cat in cats '.
244
- * arguments[2] {string } The column binding, e.g. '{{cat.name}}' .
242
+ * arguments[0] {string } The text of the repeater, e.g. 'cat in cats' .
243
+ * arguments[1] {string} The column binding , e.g. '{{ cat.name}} '.
244
+ * arguments[2] {Element } The scope of the search .
245
245
*
246
246
* @return {Array.<Element> } The elements in the column.
247
247
*/
248
248
clientSideScripts . findRepeaterColumn = function ( ) {
249
249
var matches = [ ] ;
250
- var using = arguments [ 0 ] || document ;
251
- var repeater = arguments [ 1 ] ;
252
- var binding = arguments [ 2 ] ;
250
+ var repeater = arguments [ 0 ] ;
251
+ var binding = arguments [ 1 ] ;
252
+ var using = arguments [ 2 ] || document ;
253
253
254
254
var rows = [ ] ;
255
255
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
@@ -323,14 +323,14 @@ clientSideScripts.findRepeaterColumn = function() {
323
323
* Find an input elements by model name.
324
324
* DEPRECATED - use findByModel
325
325
*
326
- * arguments[0] {Element } The scope of the search .
327
- * arguments[1] {string } The model name .
326
+ * arguments[0] {string } The model name .
327
+ * arguments[1] {Element } The scope of the search .
328
328
*
329
329
* @return {Array.<Element> } The matching input elements.
330
330
*/
331
331
clientSideScripts . findInputs = function ( ) {
332
- var using = arguments [ 0 ] || document ;
333
- var model = arguments [ 1 ] ;
332
+ var model = arguments [ 0 ] ;
333
+ var using = arguments [ 1 ] || document ;
334
334
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
335
335
for ( var p = 0 ; p < prefixes . length ; ++ p ) {
336
336
var selector = 'input[' + prefixes [ p ] + 'model="' + model + '"]' ;
@@ -344,14 +344,14 @@ clientSideScripts.findInputs = function() {
344
344
/**
345
345
* Find elements by model name.
346
346
*
347
- * arguments[0] {Element } The scope of the search .
348
- * arguments[1] {string } The model name .
347
+ * arguments[0] {string } The model name .
348
+ * arguments[1] {Element } The scope of the search .
349
349
*
350
350
* @return {Array.<Element> } The matching elements.
351
351
*/
352
352
clientSideScripts . findByModel = function ( ) {
353
- var using = arguments [ 0 ] || document ;
354
- var model = arguments [ 1 ] ;
353
+ var model = arguments [ 0 ] ;
354
+ var using = arguments [ 1 ] || document ;
355
355
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
356
356
for ( var p = 0 ; p < prefixes . length ; ++ p ) {
357
357
var selector = '[' + prefixes [ p ] + 'model="' + model + '"]' ;
@@ -365,14 +365,14 @@ clientSideScripts.findByModel = function() {
365
365
/**
366
366
* Find buttons by textual content.
367
367
*
368
- * arguments[0] {Element } The scope of the search .
369
- * arguments[1] {string } The exact text to match .
368
+ * arguments[0] {string } The exact text to match .
369
+ * arguments[1] {Element } The scope of the search .
370
370
*
371
371
* @return {Array.<Element> } The matching elements.
372
372
*/
373
373
clientSideScripts . findByButtonText = function ( ) {
374
- var using = arguments [ 0 ] || document ;
375
- var searchText = arguments [ 1 ] ;
374
+ var searchText = arguments [ 0 ] ;
375
+ var using = arguments [ 1 ] || document ;
376
376
var elements = using . querySelectorAll ( 'button, input[type="button"], input[type="submit"]' ) ;
377
377
var matches = [ ] ;
378
378
for ( var i = 0 ; i < elements . length ; ++ i ) {
@@ -394,14 +394,14 @@ clientSideScripts.findByButtonText = function() {
394
394
/**
395
395
* Find buttons by textual content.
396
396
*
397
- * arguments[0] {Element } The scope of the search .
398
- * arguments[1] {string } The exact text to match .
397
+ * arguments[0] {string } The exact text to match .
398
+ * arguments[1] {Element } The scope of the search .
399
399
*
400
400
* @return {Array.<Element> } The matching elements.
401
401
*/
402
402
clientSideScripts . findByPartialButtonText = function ( ) {
403
- var using = arguments [ 0 ] || document ;
404
- var searchText = arguments [ 1 ] ;
403
+ var searchText = arguments [ 0 ] ;
404
+ var using = arguments [ 1 ] || document ;
405
405
var elements = using . querySelectorAll ( 'button, input[type="button"], input[type="submit"]' ) ;
406
406
var matches = [ ] ;
407
407
for ( var i = 0 ; i < elements . length ; ++ i ) {
@@ -421,17 +421,17 @@ clientSideScripts.findByPartialButtonText = function() {
421
421
} ;
422
422
423
423
424
- /**
424
+ /**
425
425
* Find multiple select elements by model name.
426
426
*
427
- * arguments[0] {Element } The scope of the search .
428
- * arguments[1] {string } The model name .
427
+ * arguments[0] {string } The model name .
428
+ * arguments[1] {Element } The scope of the search .
429
429
*
430
430
* @return {Array.<Element> } The matching select elements.
431
431
*/
432
432
clientSideScripts . findSelects = function ( ) {
433
- var using = arguments [ 0 ] || document ;
434
- var model = arguments [ 1 ] ;
433
+ var model = arguments [ 0 ] ;
434
+ var using = arguments [ 1 ] || document ;
435
435
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
436
436
for ( var p = 0 ; p < prefixes . length ; ++ p ) {
437
437
var selector = 'select[' + prefixes [ p ] + 'model="' + model + '"]' ;
@@ -445,14 +445,14 @@ clientSideScripts.findSelects = function() {
445
445
/**
446
446
* Find selected option elements by model name.
447
447
*
448
- * arguments[0] {Element } The scope of the search .
449
- * arguments[1] {string } The model name .
448
+ * arguments[0] {string } The model name .
449
+ * arguments[1] {Element } The scope of the search .
450
450
*
451
451
* @return {Array.<Element> } The matching select elements.
452
452
*/
453
453
clientSideScripts . findSelectedOptions = function ( ) {
454
- var using = arguments [ 0 ] || document ;
455
- var model = arguments [ 1 ] ;
454
+ var model = arguments [ 0 ] ;
455
+ var using = arguments [ 1 ] || document ;
456
456
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
457
457
for ( var p = 0 ; p < prefixes . length ; ++ p ) {
458
458
var selector = 'select[' + prefixes [ p ] + 'model="' + model + '"] option:checked' ;
@@ -466,14 +466,14 @@ clientSideScripts.findSelectedOptions = function() {
466
466
/**
467
467
* Find textarea elements by model name.
468
468
*
469
- * arguments[0] {Element } The scope of the search .
470
- * arguments[1] {String } The model name .
469
+ * arguments[0] {String } The model name .
470
+ * arguments[1] {Element } The scope of the search .
471
471
*
472
472
* @return {Array.<Element> } An array of matching textarea elements.
473
473
*/
474
474
clientSideScripts . findTextareas = function ( ) {
475
- var using = arguments [ 0 ] || document ;
476
- var model = arguments [ 1 ] ;
475
+ var model = arguments [ 0 ] ;
476
+ var using = arguments [ 1 ] || document ;
477
477
478
478
var prefixes = [ 'ng-' , 'ng_' , 'data-ng-' , 'x-ng-' , 'ng\\:' ] ;
479
479
for ( var p = 0 ; p < prefixes . length ; ++ p ) {
0 commit comments