Bug 1392339 - Fix misuse of nsIDOMElement in API docs. r?automatedtester
MozReview-Commit-ID: 3q35q6TTbTH
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -541,17 +541,17 @@ GeckoDriver.prototype.whenBrowserStarted
} else {
logger.error("Unable to load content frame script");
}
};
/**
* Recursively get all labeled text.
*
- * @param {nsIDOMElement} el
+ * @param {Element} el
* The parent element.
* @param {Array.<string>} lines
* Array that holds the text lines.
*/
GeckoDriver.prototype.getVisibleText = function(el, lines) {
try {
if (atom.isElementDisplayed(el, this.getCurrentWindow())) {
if (el.value) {
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -102,17 +102,17 @@ element.Store = class {
addAll(els) {
let add = this.add.bind(this);
return [...els].map(add);
}
/**
* Make an element seen.
*
- * @param {nsIDOMElement} el
+ * @param {Element} el
* Element to add to set of seen elements.
*
* @return {string}
* Web element reference associated with element.
*/
add(el) {
for (let i in this.els) {
let foundEl;
@@ -153,17 +153,17 @@ element.Store = class {
/**
* Retrieve a DOM element by its unique web element reference/UUID.
*
* @param {string} uuid
* Web element reference, or UUID.
* @param {Object.<string, (WindowProxy|Element)} container
* Window and an optional shadow root that contains the element.
*
- * @returns {nsIDOMElement}
+ * @returns {Element}
* Element associated with reference.
*
* @throws {NoSuchElementError}
* If the provided reference is unknown.
* @throws {StaleElementReferenceError}
* If element has gone stale, indicating it is no longer attached to
* the DOM provided in the container.
*/
@@ -211,48 +211,51 @@ element.Store = class {
*
* If |timeout| is above 0, an implicit search technique is used.
* This will wait for the duration of |timeout| for the element
* to appear in the DOM.
*
* See the |element.Strategy| enum for a full list of supported
* search strategies that can be passed to |strategy|.
*
- * Available flags for |opts|:
+ * Available flags for <var>opts</var>:
*
- * |all|
- * If true, a multi-element search selector is used and a sequence
- * of elements will be returned. Otherwise a single element.
+ * <dl>
+ * <dt><code>all</code>
+ * <dd>
+ * If true, a multi-element search selector is used and a sequence
+ * of elements will be returned. Otherwise a single element.
*
- * |timeout|
- * Duration to wait before timing out the search. If |all| is
- * false, a NoSuchElementError is thrown if unable to find
- * the element within the timeout duration.
+ * <dt><code>timeout</code>
+ * <dd>
+ * Duration to wait before timing out the search. If <code>all</code>
+ * is false, a {@link NoSuchElementError} is thrown if unable to
+ * find the element within the timeout duration.
*
- * |startNode|
- * Element to use as the root of the search.
+ * <dt><code>startNode</code>
+ * <dd>Element to use as the root of the search.
*
- * @param {Object.<string, Window>} container
+ * @param {Object.<string, WindowProxy>} container
* Window object and an optional shadow root that contains the
* root shadow DOM element.
* @param {string} strategy
* Search strategy whereby to locate the element(s).
* @param {string} selector
* Selector search pattern. The selector must be compatible with
- * the chosen search |strategy|.
+ * the chosen search <var>strategy</var>.
* @param {Object.<string, ?>} opts
* Options.
*
- * @return {Promise.<(nsIDOMElement|Array.<nsIDOMElement>)>}
+ * @return {Promise.<(Element|Array.<Element>)>}
* Single element or a sequence of elements.
*
* @throws InvalidSelectorError
- * If |strategy| is unknown.
+ * If <var>strategy</var> is unknown.
* @throws InvalidSelectorError
- * If |selector| is malformed.
+ * If <var>selector</var> is malformed.
* @throws NoSuchElementError
* If a single element is requested, this error will throw if the
* element is not found.
*/
element.find = function(container, strategy, selector, opts = {}) {
opts.all = !!opts.all;
opts.timeout = opts.timeout || 0;
@@ -632,17 +635,17 @@ element.generateUUID = function() {
let uuid = uuidGen.generateUUID().toString();
return uuid.substring(1, uuid.length - 1);
};
/**
* Check if the element is detached from the current frame as well as
* the optional shadow root (when inside a Shadow DOM context).
*
- * @param {nsIDOMElement} el
+ * @param {Element} el
* Element to be checked.
* @param {Container} container
* Container with |frame|, which is the window object that contains
* the element, and an optional |shadowRoot|.
*
* @return {boolean}
* Flag indicating that the element is disconnected.
*/