mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:42:45 +00:00 
			
		
		
		
	 768b8415f2
			
		
	
	
		768b8415f2
		
	
	
	
	
		
			
			Now, `Element::getBoundingClientRect()` implementation depends on `Element::getClientRects()`, as defined in the specification.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			566 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			566 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <style type="text/css">
 | |
|     #box {
 | |
|         margin-top: 500px;
 | |
|         padding-top: 100px;
 | |
|         background-color: navy;
 | |
|         width: 100%;
 | |
|         height: 50px;
 | |
|     }
 | |
| </style>
 | |
| <div id="box"></div>
 | |
| <a id="inline">inline</a>
 | |
| <script src="include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         const box_rect = document.getElementById("box").getClientRects();
 | |
|         println(JSON.stringify(box_rect));
 | |
| 
 | |
|         const inline_rect = document.getElementById("inline").getClientRects();
 | |
|         println(JSON.stringify(inline_rect));
 | |
|     });
 | |
| </script>
 |