B2G/gecko/testing/marionette/marionette-server.js
/**
   * Get a given attribute of an element
   *
   * @param object aRequest
   *        'element' member holds the reference id to
   *        the element that will be inspected
   *        'name' member holds the name of the attribute to retrieve
   */
Get a given attribute of an element
@param object aRequest
'element' member holds the reference id to
the element that will be inspected
'name' member holds the name of the attribute to retrieve
Get a given attribute of an element @param object aRequest ' element ' member holds the reference id to the element that will be inspected ' name ' member holds the name of the attribute to retrieve
function MDA_getElementAttribute(aRequest) {
    let command_id = this.command_id = this.getCommandId();
    if (this.context == "chrome") {
      try {
        let el = this.curBrowser.elementManager.getKnownElement(
            aRequest.element, this.getCurrentWindow());
        this.sendResponse(utils.getElementAttribute(el, aRequest.name),
                          command_id);
      }
      catch (e) {
        this.sendError(e.message, e.code, e.stack, command_id);
      }
    }
    else {
      this.sendAsync("getElementAttribute",
                     {
                       element: aRequest.element,
                       name: aRequest.name
                     },
                     command_id);
    }
  }
function MDA_getElementAttribute ( aRequest ) { let command_id = this . command_id = this . getCommandId ( ) ; if ( this . context == "chrome" ) { try { let el = this . curBrowser . elementManager . getKnownElement ( aRequest . element , this . getCurrentWindow ( ) ) ; this . sendResponse ( utils . getElementAttribute ( el , aRequest . name ) , command_id ) ; } catch ( e ) { this . sendError ( e . message , e . code , e . stack , command_id ) ; } } else { this . sendAsync ( "getElementAttribute" , { element : aRequest . element , name : aRequest . name } , command_id ) ; } }
Get a given attribute of an element
 @param object aRequest
        'element' member holds the reference id to
        the element that will be inspected
        'name' member holds the name of the attribute to retrieve
Get a given attribute of an element @param object aRequest ' element ' member holds the reference id to the element that will be inspected ' name ' member holds the name of the attribute to retrieve