docs: function HtmlUnitDriver(
    desiredCapabilitiesOrEnableJavascript
    ) {
    var instance;
    var first = desiredCapabilitiesOrEnableJavascript;
    var len = arguments.length;
  
    if (!len) {
      instance = new Class();
    } else if (len === 1) {
      if (assert(first).extends(Capabilities).isValid) {
        instance = new Class(first._instance);
      } else if (assert.isBool(first)) {
        instance = new Class(first);
      } else {
        throw new Error(
          'The first argument must be an instance of Capabilities or a boolean.'
         );
      }
    } else {
      throw new Error('The wrong number of arguments was given.');
    }
  
    addFinalProp(this, '_instance', instance);
  }