mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	 9f581d0bc9
			
		
	
	
		9f581d0bc9
		
	
	
	
	
		
			
			Spec says that this function has to return "width of the element scrolling area" which is width of "scrolling overflow rect" in our model.
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			728 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			728 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <script src="../include.js"></script>
 | |
| <style>
 | |
|     * {
 | |
|         outline: 1px solid black;
 | |
|     }
 | |
| 
 | |
|     .scrollable {
 | |
|         width: 300px;
 | |
|         overflow-x: auto;
 | |
|         white-space: nowrap;
 | |
|     }
 | |
| 
 | |
|     span {
 | |
|         width: 100px;
 | |
|         height: 100px;
 | |
|         display: inline-block;
 | |
|     }
 | |
| </style>
 | |
| <div class="scrollable"><span>Item 1</span><span>Item 2</span><span>Item 3</span><span>Item 4</span><span>Item 5</span><span>Item 6</span><span>Item 7</span><span>Item 8</span><span>Item 9</span><span>Item 10</span><span>Item 11</span><span>Item 12</span></div>
 | |
| <script>
 | |
|     test(() => {
 | |
|         const scrollable = document.querySelector(".scrollable");
 | |
|         println(scrollable.scrollWidth);
 | |
|     });
 | |
| </script>
 |