mirror of
https://github.com/servo/servo.git
synced 2025-10-04 10:39:16 +01:00
parent
7ffcc29d54
commit
62d402f668
34 changed files with 529 additions and 513 deletions
|
@ -1,3 +1,20 @@
|
|||
<img src="test.jpeg" width="50" height="378"/>
|
||||
<script src="test_image_getter.js"></script>
|
||||
<script>
|
||||
function setWidth(w, i) {
|
||||
elem.width = w;
|
||||
window.alert(elem.width);
|
||||
w += i;
|
||||
if (w == 0 || w == 1000)
|
||||
i *= -1;
|
||||
window.setTimeout(function() { setWidth(w, i); }, 50);
|
||||
}
|
||||
|
||||
var elem = window.document.documentElement.firstChild.firstChild.nextSibling.firstChild;
|
||||
window.alert(elem.tagName);
|
||||
window.alert(elem instanceof HTMLImageElement);
|
||||
window.alert(elem instanceof HTMLElement);
|
||||
window.alert(elem instanceof Element);
|
||||
window.alert(elem.width);
|
||||
setWidth(1000, -10);
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue