mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:02:44 +00:00 
			
		
		
		
	 89ba7246dd
			
		
	
	
		89ba7246dd
		
	
	
	
	
		
			
			While it's possible to getComputedStyle() on an unconnected element, the resulting object is not supposed to have any values, since we can't resolve style without a document root anyway. This fixes a crash on https://bandcamp.com
		
			
				
	
	
		
			11 lines
		
	
	
		
			No EOL
		
	
	
		
			313 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			No EOL
		
	
	
		
			313 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html><style>
 | |
| * { font: 20px SerenitySans; }
 | |
| </style><script>
 | |
| let fragment = document.createDocumentFragment()
 | |
| let a = document.createElement("a")
 | |
| fragment.appendChild(a)
 | |
| let b = document.createElement("b")
 | |
| a.appendChild(b)
 | |
| window.getComputedStyle(b).display
 | |
| </script>
 | |
| This test passes if we don't crash. |