Bug 1400256 - Drop unused arguments to evaluate.toJSON/fromJSON. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Thu, 05 Oct 2017 17:53:25 +0100
changeset 683312 e8e3450ce2047088c7354a885538a998648acab7
parent 683311 ae899d0c3701875596b7d708c92ab4899ce16b65
child 683313 d6a40344deebcf3529bda13b895af412924b73f2
push id85331
push userbmo:ato@sny.no
push dateThu, 19 Oct 2017 14:55:23 +0000
reviewerswhimboo
bugs1400256
milestone58.0a1
Bug 1400256 - Drop unused arguments to evaluate.toJSON/fromJSON. r?whimboo MozReview-Commit-ID: 8q0PK3M4rif
testing/marionette/evaluate.js
--- a/testing/marionette/evaluate.js
+++ b/testing/marionette/evaluate.js
@@ -183,26 +183,27 @@ evaluate.sandbox = function(sb, script, 
 };
 
 /**
  * Convert any web elements in arbitrary objects to DOM elements by
  * looking them up in the seen element store.
  *
  * @param {Object} obj
  *     Arbitrary object containing web elements.
- * @param {element.Store} seenEls
- *     Element store to use for lookup of web element references.
- * @param {WindowProxy} window
- *     Current browsing context.
+ * @param {element.Store=} seenEls
+ *     Known element store to look up web elements from.  If undefined,
+ *     the web element references are returned instead.
+ * @param {WindowProxy=} window
+ *     Current browsing context, if <var>seenEls</var> is provided.
  *
  * @return {Object}
  *     Same object as provided by <var>obj</var> with the web elements
  *     replaced by DOM elements.
  */
-evaluate.fromJSON = function(obj, seenEls, window) {
+evaluate.fromJSON = function(obj, seenEls = undefined, window = undefined) {
   switch (typeof obj) {
     case "boolean":
     case "number":
     case "string":
     default:
       return obj;
 
     case "object":