mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
Implement setting element style properties. Improve serialization to return initial values when unspecified.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<div id="test" style="display: block; background-color: black; background-position: top left;"></div>
|
||||
<div id="test" style="display: block; background-color: black; background-position: top left;">test text!</div>
|
||||
<script>
|
||||
alert(document.getElementById('test').style.display);
|
||||
var id = document.getElementById('test');
|
||||
/*alert(id.style.display);
|
||||
id.style.display = 'none';
|
||||
alert(id.style.display);*/
|
||||
|
||||
id.style.background = "black";
|
||||
alert(document.getElementById('test').style.background);
|
||||
alert(document.getElementById('test').style.backgroundColor);
|
||||
alert(document.getElementById('test').style.backgroundPosition);
|
||||
|
||||
Reference in New Issue
Block a user