Check if "allow-forms" is supported:
const list = element.sandbox;
list.supports("allow-forms");
Try it Yourself »
Check if "allow-nonsense" is supported:
const list = element.sandbox;
list.supports("allow-nonsense");
Try it Yourself »
The supports()
method returns true
if a token in a DOMTokenList is one of the attribute's supported tokens.
domtokenlist.supports(token)
Parameter | Description |
token | Required. The token to check for. |
Type | Description |
Boolean | true if the token is supported, otherwise false . |
domtokenlist.supports()
is a DOM Level 4 (2015) feature.
It is supported in all modern browsers:
Chrome | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes |
domtokenlist.supports()
is not supported in Internet Explorer 11 (or earlier).
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!