netsurf/test/js/dom-html-div-element.html
Michael Drake 6098646e72 Add binding for DIV element's align getter/setter, and test.
Currently the second part of the test fails.
2015-10-29 11:47:53 +00:00

23 lines
582 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>document interface enumeration</title>
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
<h1>HTMLDivElement test</h1>
<script>
var e = document.createElement("Div");
var t = document.createTextNode("This text should be aligned right.");
e.appendChild(t);
e.setAttribute("id", "test");
e.align = "right";
document.body.appendChild(e);
var test = document.getElementById("test");
document.write("The align attribute for the above text is set to: ", test.align, ".");
</script>
</body>
</html>