I want to send the value of Data- * to CSS
In a clear way:
if the value is Entered send it to css and if the value is not entered send the default value. so i tried that:
<whatsapp data-theme="black"></whatsapp>
let whatsapp = document.querySelectorAll("whatsapp")
if(whatsapp.dataset.theme == null ||whatsapp.dataset.theme == undefined )
{
whatsapp.dataset.theme = "whatsapp-background.png"
}
whatsapp.style.background = "url('"+whatsapp.dataset.theme+"')"
whatsapp.style.background = whatsapp.dataset.theme