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