0

I recently had to add CSP meta tags into my application which is causing an error specifically on the .setAttribute command

How can I write the following snippets to be CSP compliant. (I've heard i can use .style but how would i write it with these types of lines)

nextEletxt.setAttribute('tabindex','0');
crntTarget.firstElementChild.setAttribute('aria-expanded', 'true')
targetElem.setAttribute('id", refID);

how can i rewrite these to be CSP compliant(no inline styles)

julian reeves
  • 39
  • 1
  • 4

0 Answers0