Skip to content
Related Articles

Related Articles

HTML DOM TokenList supports() Method

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Jul, 2022
View Discussion
Improve Article
Save Article

The supports() method in HTML DOM is used to check if a specific token is supported in a DOM TokenList. 



Parameter values: It contains a single value token that specifies the name of the token which is to be checked. 

Return value: It returns a boolean value that returns true if a specified token belongs to a DOM TokenList.  

Example: Below HTML code illustrates the use of supports() method in HTML DOM. 


<!DOCTYPE html>
<body style="text-align:center">
    <h1 style="color: green;">
    <h2>HTML DOM TokenList supports() Method</h2>
    <iframe id="iframeID" src=
        Click on the below button if the
        iframe supports "allow-forms":or not
    <button onclick="btnclick()">
        Click Here!
    <p id="paraID" style="font-size:25px"></p>
        function btnclick() {
            const list = document.getElementById(
                = list.supports("allow-forms");



Supported Browsers:

  • Google Chrome 49 and above
  • Edge 17 and above
  • Internet Explorer not supported
  • Firefox 49 and above
  • Safari 10.1 and above
  • Opera 36 and above

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!