Improve color serialization by retaining author-specified keywords.

This commit is contained in:
Josh Matthews 2014-09-22 11:23:22 -04:00
parent 6f8a9b6d46
commit 755ebd6528
4 changed files with 45 additions and 10 deletions

View file

@ -1,10 +1,10 @@
<div id="test" style="display: block; background-color: black; background-position: top left;">test text!</div>
<div id="test" style="display: block; background-color: black; background-position: top left; font-style: italic">test text!</div>
<script>
var id = document.getElementById('test');
/*alert(id.style.display);
id.style.display = 'none';
alert(id.style.display);*/
alert(id.style.fontStyle + ' ' + id.style['font-style']);
id.style.background = "black";
alert(document.getElementById('test').style.background);
alert(document.getElementById('test').style.backgroundColor);