此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

CustomStateSet:clear() 方法

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.

CustomStateSet 接口的 clear() 方法用于从 CustomStateSet 对象中移除所有元素。

语法

js
clear()

参数

无。

返回值

无。

规范

Specification
HTML
# custom-state-pseudo-class

浏览器兼容性