Start a new topic

DOMTokenList.add_ and remove_ issues with new update

DOMTokenList.add_ and DOMTokenList.remove_ NOW FAILS TO COMPLIE AFTER UPGRADING TO 2.1.1607.


This function was working just fine:


public static void toggleClass(HTMLElement element, string classname)
 {
   if (element != null) {
     if (element.classList.contains(classname)) {
       element.classList.remove_(classname);
     } else {
       element.classList.add_(classname);
     }
   }
 }

 

Now gets compiler error:

 

Error CS1061: 'DOMTokenList' does not contain a definition for 'add_' and no extension method 'add_' accepting a first argument of type 'DOMTokenList' could be found (are you missing a using directive or an assembly reference?) (CS1061)  


As you can see above i am passing the same string to add_ and remove_, but now there is an erro

1 Comment

I guess you guys change to just "add" and "remove" with NO underscore... Kool deal... fixed that... Thanks for the REAL QUICK Response.

Login or Signup to post a comment