mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-20 01:29:20 +03:00
Tests: Add simple JS test for dynamic layout.
This commit is contained in:
parent
519f029420
commit
35e9b5de6d
18
test/js/event-onclick-insert.html
Normal file
18
test/js/event-onclick-insert.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<button onclick="add_paragraph()">Click me!</button>
|
||||
|
||||
<script>
|
||||
function add_paragraph() {
|
||||
var paragraph = document.createElement("P");
|
||||
var textnode = document.createTextNode("New paragraph!");
|
||||
paragraph.appendChild(textnode);
|
||||
document.body.appendChild(paragraph);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user