mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 03:32:35 +03:00
Add failing test.
1. Add "id" attribute. 2. Remove "ID" attribute. 3. Check id value. In NetSurf it isn't removed, in Firefox it is. There's a case sensitivity/conversion issue somewhere. It the test works when we add/remove with the same case.
This commit is contained in:
parent
0fabb20cc5
commit
396b445599
26
test/js/dom-element-attribute.html
Normal file
26
test/js/dom-element-attribute.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>element set remove attribute</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("Div");
|
||||
var t = document.createTextNode("Some text in a div.");
|
||||
e.appendChild(t);
|
||||
e.setAttribute("id", "test");
|
||||
document.body.appendChild(e);
|
||||
</script>
|
||||
<script>
|
||||
var test = document.getElementById("test");
|
||||
document.write("<p>The div has id: ''", test.id, "''.</p>");
|
||||
document.write("<p>Removing ID attribute...");
|
||||
test.removeAttribute("ID");
|
||||
document.write("<p>The div has id: ''", test.id, "''.</p>");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user