B2G/gecko/testing/marionette/marionette-elements.js
/**
   * Return an object with any namedArgs applied to it. Used
   * to let clients use given names when refering to arguments
   * in execute calls, instead of using the arguments list.
   *
   * @param object args
   *        list of arguments being passed in
   *
   * @return object
   *        If '__marionetteArgs' is in args, then
   *        it will return an object with these arguments
   *        as its members.
   */
Return an object with any namedArgs applied to it. Used
to let clients use given names when refering to arguments
in execute calls, instead of using the arguments list.

@param object args
list of arguments being passed in

@return object
If '__marionetteArgs' is in args, then
it will return an object with these arguments
as its members.
Return an object with any namedArgs applied to it . Used to let clients use given names when refering to arguments in execute calls instead of using the arguments list . @param object args list of arguments being passed in @return object If ' __marionetteArgs ' is in args then it will return an object with these arguments as its members .
function EM_applyNamedArgs(args) {
    namedArgs = {};
    args.forEach(function(arg) {
      if (typeof(arg['__marionetteArgs']) === 'object') {
        for (let prop in arg['__marionetteArgs']) {
          namedArgs[prop] = arg['__marionetteArgs'][prop];
        }
      }
    });
    return namedArgs;
  }
function EM_applyNamedArgs ( args ) { namedArgs = { } ; args . forEach ( function ( arg ) { if ( typeof ( arg [ '__marionetteArgs' ] ) === 'object' ) { for ( let prop in arg [ '__marionetteArgs' ] ) { namedArgs [ prop ] = arg [ '__marionetteArgs' ] [ prop ] ; } } } ) ; return namedArgs ; }
Return an object with any namedArgs applied to it.
Return an object with any namedArgs applied to it .