How to use the webidl-conversions.DOMString 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 / node_modules / jsdom / lib / jsdom / living / generated / ElementCreationOptions.js View on Github external
convertInherit(obj, ret, { context = "The provided value" } = {}) {
    {
      const key = "is";
      let value = obj === undefined || obj === null ? undefined : obj[key];
      if (value !== undefined) {
        value = conversions["DOMString"](value, { context: context + " has member is that" });

        ret[key] = value;
      }
    }
  },
github sx1989827 / DOClever / node_modules / jsdom / lib / jsdom / living / generated / KeyboardEvent.js View on Github external
if (new.target === undefined) {
    throw new TypeError(
      "Failed to construct 'KeyboardEvent'. Please use the 'new' operator; this constructor " +
        "cannot be called as a function."
    );
  }

  if (arguments.length < 1) {
    throw new TypeError(
      "Failed to construct 'KeyboardEvent': 1 argument required, but only " + arguments.length + " present."
    );
  }
  const args = [];
  {
    let curArg = arguments[0];
    curArg = conversions["DOMString"](curArg, { context: "Failed to construct 'KeyboardEvent': parameter 1" });
    args.push(curArg);
  }
  {
    let curArg = arguments[1];
    curArg = convertKeyboardEventInit(curArg, { context: "Failed to construct 'KeyboardEvent': parameter 2" });
    args.push(curArg);
  }

  iface.setup(this, args);
}
github lintopher0315 / Quick-Math / node_modules / jsdom / lib / jsdom / living / generated / DocumentType.js View on Github external
before() {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }
    const args = [];
    for (let i = 0; i < arguments.length; i++) {
      let curArg = arguments[i];
      if (isNode(curArg)) {
        curArg = utils.implForWrapper(curArg);
      } else {
        curArg = conversions["DOMString"](curArg, {
          context: "Failed to execute 'before' on 'DocumentType': parameter " + (i + 1)
        });
      }
      args.push(curArg);
    }
    return this[impl].before(...args);
  }
github sx1989827 / DOClever / Server / node_modules / jsdom / lib / jsdom / living / generated / Document.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

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

    this[impl]["title"] = V;
  },
github gazooka / GhostInAzureWebApp / node_modules / jsdom / lib / jsdom / living / generated / HTMLAnchorElement.js View on Github external
set shape(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

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

    this.setAttributeNS(null, "shape", V);
  }
github gazooka / GhostInAzureWebApp / node_modules / jsdom / lib / jsdom / living / generated / HTMLEmbedElement.js View on Github external
set align(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

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

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

    if (V === null || V === undefined) {
      V = null;
    } else {
      V = conversions["DOMString"](V, {
        context: "Failed to set the 'textContent' property on 'Node': The provided value"
      });
    }
    this[impl]["textContent"] = V;
  },
github zubairghori / Ultimate_todo_list / node_modules / jsdom / lib / jsdom / living / generated / HTMLFrameElement.js View on Github external
set(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

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

    this.setAttribute("frameBorder", V);
  },
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / living / generated / History.js View on Github external
}

  if (arguments.length < 2) {
    throw new TypeError(
      "Failed to execute 'pushState' on 'History': 2 arguments required, but only " + arguments.length + " present."
    );
  }
  const args = [];
  {
    let curArg = arguments[0];
    curArg = conversions["any"](curArg, { context: "Failed to execute 'pushState' on 'History': parameter 1" });
    args.push(curArg);
  }
  {
    let curArg = arguments[1];
    curArg = conversions["DOMString"](curArg, { context: "Failed to execute 'pushState' on 'History': parameter 2" });
    args.push(curArg);
  }
  {
    let curArg = arguments[2];
    if (curArg !== undefined) {
      if (curArg === null || curArg === undefined) {
        curArg = null;
      } else {
        curArg = conversions["USVString"](curArg, {
          context: "Failed to execute 'pushState' on 'History': parameter 3"
        });
      }
    } else {
      curArg = null;
    }
    args.push(curArg);
github gazooka / GhostInAzureWebApp / node_modules / jsdom / lib / jsdom / living / generated / HTMLLinkElement.js View on Github external
set media(V) {
    if (!this || !module.exports.is(this)) {
      throw new TypeError("Illegal invocation");
    }

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

    this.setAttributeNS(null, "media", V);
  }