Merge pull request #3888 from coolwanglu/master
Add 'contains' for the classList implementation
This commit is contained in:
commit
49dc1ccbe9
@ -361,12 +361,16 @@ if (typeof PDFJS === 'undefined') {
|
||||
if (index >= 0 && remove)
|
||||
list.splice(index, 1);
|
||||
element.className = list.join(' ');
|
||||
return (index >= 0);
|
||||
}
|
||||
|
||||
var classListPrototype = {
|
||||
add: function(name) {
|
||||
changeList(this.element, name, true, false);
|
||||
},
|
||||
contains: function(name) {
|
||||
return changeList(this.element, name, false, false);
|
||||
},
|
||||
remove: function(name) {
|
||||
changeList(this.element, name, false, true);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user