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 680909 1c8004994541eb7dc562baa220f0d025aa4f1e09
parent 680908 1d3019950c5b8df0f147c45dab5ebcf00ea01594
child 680910 a1c9114db817ed7b00b750940d6ffc8d2163f008
push id84673
push userbmo:ato@sny.no
push dateMon, 16 Oct 2017 15:00:17 +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":