mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
Cargoify servo
This commit is contained in:
parent
db2f642c32
commit
c6ab60dbfc
1761 changed files with 8423 additions and 2294 deletions
20
tests/html/test-js-image.html
Normal file
20
tests/html/test-js-image.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<img src="test.jpeg" width="50" height="378"/>
|
||||
<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