Back to Content

CustomStateSet: has() method

files/en-us/web/api/customstateset/has/index.md

latest491 B
Original Source

{{APIRef("Web Components")}}

The has() method of the {{domxref("CustomStateSet")}} interface returns a {{jsxref("Boolean")}} asserting whether an element is present with the given value.

Syntax

js-nolint
has(value)

Parameters

  • value
    • : The value to test for in the CustomStateSet object.

Return value

A {{jsxref("Boolean")}}, true if value exists in the CustomStateSet.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}