CustomStateSet: has() method
Baseline
2024
Newly available
Since May 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Phương thức has() của giao diện CustomStateSet trả về Boolean xác nhận xem phần tử có mặt với giá trị đã cho hay không.
Cú pháp
js
has(value)
Tham số
value-
Giá trị cần kiểm tra trong đối tượng
CustomStateSet.
Giá trị trả về
Một Boolean, true nếu value tồn tại trong CustomStateSet.
Thông số kỹ thuật
| Specification |
|---|
| HTML> # custom-state-pseudo-class> |