mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			838 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			838 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         let testCounter = 1;
 | |
|         function testPart(part) {
 | |
|             println(`${testCounter++}. ${JSON.stringify(part())}`);
 | |
|         }
 | |
| 
 | |
|         // 1. Set the pre element width attributes
 | |
|         testPart(() => {
 | |
|             const pre = document.createElement('pre');
 | |
|             pre.width = 20;
 | |
|             return pre.width;
 | |
|         });
 | |
| 
 | |
|         // 2. Set the pre element width attributes with invalid data
 | |
|         testPart(() => {
 | |
|             const pre = document.createElement('pre');
 | |
|             pre.width = 'dsafds';
 | |
|             return pre.width;
 | |
|         });
 | |
| 
 | |
|         // 3. Get the pre element width attribute default value
 | |
|         testPart(() => {
 | |
|             const pre = document.createElement('pre');
 | |
|             return pre.width;
 | |
|         });
 | |
|     });
 | |
| </script>
 | 
