Skip to content

Commit

Permalink
A few minor jsdoc tweaks to improve formatting when generating API do…
Browse files Browse the repository at this point in the history
…cumentation.
  • Loading branch information
jleyba committed Oct 21, 2013
1 parent 5b9adac commit 5c16266
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions javascript/atoms/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ bot.Device.prototype.fireMSPointerEvent = function(type, coord, button,


/**
* A mouse event fired "on" an <option> element, doesn't always fire on the
* <option> element itself. Sometimes it fires on the parent <select> element
* A mouse event fired "on" an option element, doesn't always fire on the
* option element itself. Sometimes it fires on the parent select element
* and sometimes not at all, depending on the browser and event type. This
* returns the true target element of the event, or null if none is fired.
*
Expand Down Expand Up @@ -687,7 +687,7 @@ bot.Device.isForm_ = function(node) {

/**
* Submits the specified form. Unlike the public function, it expects to be
* given a <form> element and fails if it is not.
* given a form element and fails if it is not.
* @param {!Element} form The form to submit.
* @protected
*/
Expand Down
2 changes: 2 additions & 0 deletions javascript/atoms/mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@ bot.Mouse.NO_BUTTON_VALUE_INDEX_ = 3;
* Maps mouse events to an array of button argument value for each mouse button.
* The array is indexed by the bot.Mouse.Button values. It encodes this table,
* where each cell contains the (left/middle/right/none) button values.
* <pre>
* click/ mouseup/ mouseout/ mousemove contextmenu
* dblclick mousedown mouseover
* IE_DOC_PRE9 0 0 0 X 1 4 2 X 0 0 0 0 1 4 2 0 X X 0 X
* WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 0 0 1 2 0 X X 2 X
* GECKO/OPERA 0 1 2 X 0 1 2 X 0 0 0 0 0 0 0 0 X X 2 X
* </pre>
* @private {!Object.<bot.events.EventType, !Array.<?number>>}
* @const
*/
Expand Down
13 changes: 8 additions & 5 deletions javascript/webdriver/webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ goog.require('webdriver.promise');
* object to manipulate the command result or catch an expected error. Any
* commands scheduled with a callback are considered sub-commands and will
* execute before the next command in the current frame. For example:
*
* <pre><code>
* var message = [];
* driver.call(message.push, message, 'a').then(function() {
* driver.call(message.push, message, 'b');
Expand All @@ -61,6 +61,7 @@ goog.require('webdriver.promise');
* driver.call(function() {
* alert('message is abc? ' + (message.join('') == 'abc'));
* });
* </code></pre>
*
* @param {!(webdriver.Session|webdriver.promise.Promise)} session Either a
* known session or a promise that will be resolved to a session.
Expand Down Expand Up @@ -1450,22 +1451,24 @@ webdriver.Key.chord = function(var_args) {
* Represents a DOM element. WebElements can be found by searching from the
* document root using a {@code webdriver.WebDriver} instance, or by searching
* under another {@code webdriver.WebElement}:
*
* <pre><code>
* driver.get('http://www.google.com');
* var searchForm = driver.findElement(By.tagName('form'));
* var searchBox = searchForm.findElement(By.name('q'));
* searchBox.sendKeys('webdriver');
* </code></pre>
*
* The WebElement is implemented as a promise for compatibility with the promise
* API. It will always resolve itself when its internal state has been fully
* resolved and commands may be issued against the element. This can be used to
* catch errors when an element cannot be located on the page:
*
* <pre><code>
* driver.findElement(By.id('not-there')).then(function(element) {
* alert('Found an element that was not expected to be there!');
* }, function(error) {
* alert('The element was not found, as expected');
* });
* </code></pre>
*
* @param {!webdriver.WebDriver} driver The parent WebDriver instance for this
* element.
Expand Down Expand Up @@ -1711,15 +1714,15 @@ webdriver.WebElement.prototype.click = function() {
* this key is encountered, all modifier keys current in the down state are
* released (with accompanying keyup events). The NULL key can be used to
* simulate common keyboard shortcuts:
* <code>
* <code><pre>
* element.sendKeys("text was",
* webdriver.Key.CONTROL, "a", webdriver.Key.NULL,
* "now text is");
* // Alternatively:
* element.sendKeys("text was",
* webdriver.Key.chord(webdriver.Key.CONTROL, "a"),
* "now text is");
* </code></li>
* </pre></code></li>
* <li>The end of the keysequence is encountered. When there are no more keys
* to type, all depressed modifier keys are released (with accompanying keyup
* events).
Expand Down

0 comments on commit 5c16266

Please sign in to comment.