mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 10:42:36 +03:00
Add paragraph proto test.
This commit is contained in:
parent
2443cc432d
commit
b1dbc046f1
23
test/js/dom-element-create.html
Normal file
23
test/js/dom-element-create.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Create paragraph and inspect its proto</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>HTMLElement test of attribute set/remove</h1>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var e = document.createElement("p");
|
||||||
|
var t = document.createTextNode("Some text in a paragraph.");
|
||||||
|
e.appendChild(t);
|
||||||
|
e.setAttribute("id", "test");
|
||||||
|
document.body.appendChild(e);
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
var test = document.getElementById("test");
|
||||||
|
document.write("<p>Paragraph element proto: ", test, ".</p>");
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user