mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:02:45 +00:00 
			
		
		
		
	 ff48b7333c
			
		
	
	
		ff48b7333c
		
	
	
	
	
		
			
			We currently create a shadow tree once for each DOM element that renders with a shadow tree (e.g. <input>, <details>). If such an element is removed from the DOM, we must remove its shadow tree. Otherwise, the shadow tree will refer to the old document in perpetuity. If the node is added back to a DOM, then recreate the shadow tree.
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			263 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			263 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <div id=test></div>
 | |
| <script src="../include.js"></script>
 | |
| <script>
 | |
|     test(() => {
 | |
|         let element = document.getElementById('test');
 | |
|         element.innerHTML = "<details><summary></summary></details>";
 | |
|         println(element.innerHTML);
 | |
|     });
 | |
| </script>
 |