mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:12:45 +00:00 
			
		
		
		
	 cfe9577b48
			
		
	
	
		cfe9577b48
		
	
	
	
	
		
			
			(Or rather, bring offsetLeft and offsetTop closer to spec, and implement the previously-missing offsetParent) This makes mouse inputs on https://nerget.com/fluidSim/ work properly.
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			619 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			619 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <style>
 | |
| * {
 | |
|     margin: 0;
 | |
|     padding: 0;
 | |
| }
 | |
| table {
 | |
|     position: relative;
 | |
|     top: 100px;
 | |
|     left: 50px;
 | |
| }
 | |
| </style><table><tr><td><canvas id="c"></canvas></td></tr></table>
 | |
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         const c = document.getElementById("c");
 | |
|         println("");
 | |
| 
 | |
|         for (let n = c; n; n = n.offsetParent) {
 | |
|             println("nodeName: " + n.nodeName);
 | |
|             println("offsetTop: " + n.offsetTop);
 | |
|             println("offsetLeft: " + n.offsetLeft);
 | |
|             println("offsetParent: " + n.offsetParent);
 | |
|             println("");
 | |
|         }
 | |
|     });
 | |
| </script>
 |