[Tabs] Ne plus utiliser setAttribute('style') pour les CSP

Description

Lié à #148 (closed)

👉 Pour des soucis de Content-Security-Policy, ne pas utiliser el.setAttribute('style', ...) mais plutôt el.style.<property> ou encore mieux, passer par un attribut global.

Microsoft FastElement a fait le choix de toggle un attribut hidden qui s'occupe du display: none : https://github.com/microsoft/fast/blob/df2ca503b1e2e060b3ddc32af0765505c65bb7f5/packages/web-components/fast-foundation/src/tabs/tabs.ts#L199C12-L201C54

L'attribut hidden fonctionne comme ceci : https://github.com/microsoft/fast/blob/df2ca503b1e2e060b3ddc32af0765505c65bb7f5/packages/web-components/fast-foundation/src/utilities/style/display.ts#L34


Code à modifier dans les tabs :

if (idx !== this.currentActiveTabIndex) {
    el.setAttribute('style', 'display: none;');
} else {
    el.setAttribute('style', 'display: block;');
}
Edited by Rémi Martinez