CustomStateSet: has() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{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
CustomStateSetobject.
Return value
A {{jsxref("Boolean")}}, true if value exists in the CustomStateSet.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}