mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Implement setting element style properties. Improve serialization to return initial values when unspecified.
This commit is contained in:
parent
505e1855a3
commit
6f8a9b6d46
6 changed files with 218 additions and 20 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue