подскажите подалуйста
делаю сетатрибут
css
style : { 'background-color': '#EDE6E6',
boxShadow : ' 1px -1px 5px 3px rgba(0, 0, 0, .2)',
}
так boxShadow не работает другие свойства добавляю работают
html.setAttribute("style", (s = JSON.stringify( htmlAttribute['style'] ) ).substr(1, (s.length-2) ).replace(/,/g, ';').replace(/"/g, '') + ';' )
так если добавить работает
html.setAttribute("style", " box-Shadow : 1px -1px 5px 3px + rgba(0, 0, 0, .2) " )
а так только последний пункт добавляется не пойму почему
подскажите пожалуйста
if('style' in htmlAttribute )
{
for( var i in htmlAttribute['style'] )
{
var c = i, d = htmlAttribute['style'][i]
html.setAttribute('style', ( c+ ':' + d +';') )
}
}