I'm trying to implement slds tabs and in order to switch between tabs, I need to change the css classes. However, when I try to add or remove classes from the classList, it gives below error in console:
Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-3744c145-c1b2-ab4c-c4f2-225fd8e53422' chrome-extension: 'unsafe-inline' 'unsafe-eval' *.canary.lwc.dev *.visualforce.com https://ssl.gstatic.com/accessibility/ https://static.lightning.force.com". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.
Below is the code snippet:
changeSelectedTab(event){
//remove class for already selected tab
this.template.querySelector('.slds-is-active').classList.remove('.slds-is-active');
}
I also tried,
`this.template.querySelector('.slds-is-active').className= '';
` Both of these approaches aren't working. Can someone please help me resolve this.