1 var alphabet = 'a!`=[]\\;\':"/<> &';
3 var out = document.getElementById('out');
4 var testContainer = document.getElementById('testContainer');
10 function testImage() {
11 return testContainer.firstChild;
14 function test(input) {
16 var oldInput, newInput;
17 testContainer.innerHTML = "<img />";
18 testImage().setAttribute("alt", input);
20 print("Test input: " + input);
22 oldInput = testImage().getAttribute("alt");
23 var intermediate = testContainer.innerHTML;
24 print("Render: " + intermediate);
25 testContainer.innerHTML = intermediate;
26 if (testImage() == null) {
27 print("Image disappeared...");
30 newInput = testImage().getAttribute("alt");
31 print("New value: " + newInput);
33 } while (count < 5 && newInput != oldInput);
35 print("Failed to achieve fixpoint");
37 testContainer.innerHTML = "";
45 for (var i = 0; i < alphabet.length; i++) {
46 for (var j = 0; j < alphabet.length; j++) {
47 test(alphabet.charAt(i) + alphabet.charAt(j));
51 // document.getElementById('out').textContent = alphabet;