How to use the webidl-conversions.boolean function in webidl-conversions

To help you get started, we’ve selected a few webidl-conversions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sx1989827 / DOClever / Server / node_modules / jsdom / lib / jsdom / living / generated / AddEventListenerOptions.js View on Github external
convertInherit(obj, ret, { context = "The provided value" } = {}) {
    EventListenerOptions.convertInherit(obj, ret, { context });

    {
      const key = "once";
      let value = obj === undefined || obj === null ? undefined : obj[key];
      if (value !== undefined) {
        value = conversions["boolean"](value, { context: context + " has member once that" });

        ret[key] = value;
      } else {
        ret[key] = false;
      }
    }
  },
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / generated / HTMLObjectElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'declare' property on 'HTMLObjectElement': The provided value"
    });

    if (V) {
      this.setAttribute("declare", "");
    } else {
      this.removeAttribute("declare");
    }
  },
github zubairghori / Ultimate_todo_list / node_modules / jsdom / lib / jsdom / living / generated / HTMLElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'hidden' property on 'HTMLElement': The provided value"
    });

    if (V) {
      this.setAttribute("hidden", "");
    } else {
      this.removeAttribute("hidden");
    }
  },
github zubairghori / Ultimate_todo_list / node_modules / jsdom / lib / jsdom / living / generated / KeyboardEvent.js View on Github external
}
  {
    let curArg = arguments[7];
    if (curArg !== undefined) {
      curArg = conversions["boolean"](curArg, {
        context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 8"
      });
    } else {
      curArg = false;
    }
    args.push(curArg);
  }
  {
    let curArg = arguments[8];
    if (curArg !== undefined) {
      curArg = conversions["boolean"](curArg, {
        context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 9"
      });
    } else {
      curArg = false;
    }
    args.push(curArg);
  }
  {
    let curArg = arguments[9];
    if (curArg !== undefined) {
      curArg = conversions["boolean"](curArg, {
        context: "Failed to execute 'initKeyboardEvent' on 'KeyboardEvent': parameter 10"
      });
    } else {
      curArg = false;
    }
github gazooka / GhostInAzureWebApp / node_modules / jsdom / lib / jsdom / living / generated / HTMLButtonElement.js View on Github external
set disabled(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'disabled' property on 'HTMLButtonElement': The provided value"
    });

    if (V) {
      this.setAttributeNS(null, "disabled", "");
    } else {
      this.removeAttributeNS(null, "disabled");
    }
  }
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / generated / HTMLAreaElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'noHref' property on 'HTMLAreaElement': The provided value"
    });

    if (V) {
      this.setAttribute("noHref", "");
    } else {
      this.removeAttribute("noHref");
    }
  },
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / generated / HTMLInputElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'readOnly' property on 'HTMLInputElement': The provided value"
    });

    if (V) {
      this.setAttribute("readOnly", "");
    } else {
      this.removeAttribute("readOnly");
    }
  },
github sx1989827 / DOClever / node_modules / jsdom / lib / jsdom / living / generated / HTMLFormElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'noValidate' property on 'HTMLFormElement': The provided value"
    });

    if (V) {
      this.setAttribute("noValidate", "");
    } else {
      this.removeAttribute("noValidate");
    }
  },
github zubairghori / Ultimate_todo_list / node_modules / jsdom / lib / jsdom / living / generated / EventTarget.js View on Github external
let curArg = arguments[2];
    if (curArg !== undefined) {
      if (curArg === null || curArg === undefined) {
        curArg = convertEventListenerOptions(curArg, {
          context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
        });
      } else if (utils.isObject(curArg)) {
        curArg = convertEventListenerOptions(curArg, {
          context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3" + " dictionary"
        });
      } else if (typeof curArg === "boolean") {
        curArg = conversions["boolean"](curArg, {
          context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
        });
      } else {
        curArg = conversions["boolean"](curArg, {
          context: "Failed to execute 'removeEventListener' on 'EventTarget': parameter 3"
        });
      }
    }
    args.push(curArg);
  }
  return this[impl].removeEventListener(...args);
};
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / generated / HTMLTableCellElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

    V = conversions["boolean"](V, {
      context: "Failed to set the 'noWrap' property on 'HTMLTableCellElement': The provided value"
    });

    if (V) {
      this.setAttribute("noWrap", "");
    } else {
      this.removeAttribute("noWrap");
    }
  },