mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:22:45 +00:00 
			
		
		
		
	 8a43f5a64a
			
		
	
	
		8a43f5a64a
		
	
	
	
	
		
			
			Otherwise, we will treat the loaded style sheet as if it had media="all" which is not always appropriate.
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			465 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			465 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <style>
 | |
| body {
 | |
|     background: green;
 | |
| }
 | |
| </style>
 | |
| <script src="include.js"></script>
 | |
| <script>
 | |
|     let link = document.createElement("link");
 | |
|     link.setAttribute("rel", "stylesheet");
 | |
|     link.setAttribute("href", "body-background-color-red.css");
 | |
|     link.setAttribute("media", "print")
 | |
|     document.head.appendChild(link)
 | |
| 
 | |
|     window.onload = function() {
 | |
|         println("document background: " + getComputedStyle(document.body).backgroundColor)
 | |
|     }
 | |
| </script>
 |