mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:02:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			827 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			827 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="./include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         let testCounter = 1;
 | |
|         function testPart(part) {
 | |
|             println(`${testCounter++}. ${JSON.stringify(part())}`);
 | |
|         }
 | |
| 
 | |
|         // 1. Set output element value
 | |
|         testPart(() => {
 | |
|             const output = document.createElement('output');
 | |
|             output.value = 'PASS';
 | |
|             return output.textContent;
 | |
|         });
 | |
| 
 | |
|         // 2. Set output element default value and reset
 | |
|         testPart(() => {
 | |
|             const form = document.createElement('form');
 | |
|             const output = document.createElement('output');
 | |
|             output.defaultValue = 'PASS';
 | |
|             output.value = 'FAIL';
 | |
|             form.appendChild(output);
 | |
|             form.reset();
 | |
|             return output.textContent;
 | |
|         });
 | |
|     });
 | |
| </script>
 | 
