Skip to content

Commit

Permalink
feat: add support for nonce attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
websi committed Apr 10, 2024
1 parent 6ccb353 commit bd6a792
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/consent-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ export default class ConsentManager {
newElement.setAttribute(attribute.name, attribute.value)
}

if (element.hasAttribute('nonce')) {
newElement.setAttribute('nonce', element.nonce)
}
newElement.innerText = element.innerText
newElement.text = element.text

Expand Down

0 comments on commit bd6a792

Please sign in to comment.