W3cubDocs

/Support Tables

classList (DOMTokenList)

Method of easily manipulating classes on elements, using the DOMTokenList object.

Spec https://dom.spec.whatwg.org/#dom-element-classlist
Status WHATWG Living Standard
IE Edge Firefox Chrome Safari Opera
    60 66    
    59 65   50
  17 58 64 TP 49
11 (1,2,3,4) 16 57 63 11 48
10 (1,2,3) 15 56 62 10.1 47
9 14 55 61 10 46
8 13 54 60 9.1 45
Show all
7 12 53 59 9 44
6   52 58 8 43
5.5   51 57 7.1 42
    50 56 7 41
    49 55 6.1 (1,2,3) 40
    48 54 6 (1,2,3) 39
    47 53 5.1 (1,2,3) 38
    46 52 5 37
    45 51 4 36
    44 50 3.2 35
    43 49 3.1 34
    42 48   33
    41 47   32
    40 46   31
    39 45   30
    38 44   29
    37 43   28
    36 42   27
    35 41   26
    34 40   25
    33 39   24
    32 38   23
    31 37   22
    30 36   21
    29 35   20
    28 34   19
    27 33   18
    26 32   17
    25 (3) 31   16
    24 (3) 30   15
    23 (2,3) 29   12.1 (1,2,3)
    22 (2,3) 28   12 (1,2,3)
    21 (2,3) 27 (3)   11.6 (1,2,3)
    20 (2,3) 26 (3)   11.5 (1,2,3)
    19 (2,3) 25 (3)   11.1
    18 (2,3) 24 (3)   11
    17 (2,3) 23 (2,3)   10.6
    16 (2,3) 22 (1,2,3)   10.5
    15 (2,3) 21 (1,2,3)   10.0-10.1
    14 (2,3) 20 (1,2,3)   9.5-9.6
    13 (2,3) 19 (1,2,3)   9
    12 (2,3) 18 (1,2,3)    
    11 (2,3) 17 (1,2,3)    
    10 (2,3) 16 (1,2,3)    
    9 (2,3) 15 (1,2,3)    
    8 (2,3) 14 (1,2,3)    
    7 (2,3) 13 (1,2,3)    
    6 (2,3) 12 (1,2,3)    
    5 (2,3) 11 (1,2,3)    
    4 (2,3) 10 (1,2,3)    
    3.6 (2,3) 9 (1,2,3)    
    3.5 8 (1,2,3)    
    3 7    
    2 6    
      5    
      4    
iOS Safari Opera Mini Android Browser Blackberry Browser Opera Mobile Android Chrome Android Firefox IE Mobile Android UC Browser Samsung Internet QQ Browser Baidu Browser
11.0-11.2 all (1,2,3) 62 10 37 62 57 11 (1,2,3) 11.4 6.2 1.2 7.12
10.3   4.4.3-4.4.4 7 (1,2,3) 12.1 (1,2,3)     10 (1,2,3)   5    
10.0-10.2   4.4   12 (1,2,3)         4    
9.3   4.2-4.3 (1,2,3)   11.5 (1,2,3)              
Show all
9.0-9.2   4.1 (1,2,3)   11.1 (1,2,3)              
8.1-8.4   4 (1,2,3)   11              
8   3 (1,2,3)   10              
7.0-7.1   2.3                  
6.0-6.1 (1,2,3)   2.2                  
5.0-5.1 (1,2,3)   2.1                  
4.2-4.3                      
4.0-4.1                      
3.2                      

Notes

  1. Does not have support for classList on SVG or MathML elements.

  2. Does not support the second parameter for the toggle method

  3. Does not support multiple parameters for the add() & remove() methods

  4. Does not support assign to classList

Bugs

  • Opera (Presto) has classList support on SVG elements, but not on MathML elements.

Resources

Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
http://caniuse.com/#feat=classlist