How to set a data attribute programmatically
use the dataset on an element.
const el = document.querySelector('.myElement');
el.dataset.bsTheme = 'light';
use the dataset on an element.
const el = document.querySelector('.myElement');
el.dataset.bsTheme = 'light';