mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:52:45 +00:00 
			
		
		
		
	LibWeb: Remove shadow roots from elements that are removed from the DOM
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.
This commit is contained in:
		
							parent
							
								
									3cde479416
								
							
						
					
					
						commit
						ff48b7333c
					
				
					 12 changed files with 67 additions and 3 deletions
				
			
		
							
								
								
									
										9
									
								
								Tests/LibWeb/Text/input/HTML/set-innerHTML-input.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Tests/LibWeb/Text/input/HTML/set-innerHTML-input.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| <div id=test></div> | ||||
| <script src="../include.js"></script> | ||||
| <script> | ||||
|     test(() => { | ||||
|         let element = document.getElementById('test'); | ||||
|         element.innerHTML = "<input>"; | ||||
|         println(element.innerHTML); | ||||
|     }); | ||||
| </script> | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn