mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-30 21:01:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			288 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			288 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| load("test-common.js");
 | |
| 
 | |
| try {
 | |
|   assert(typeof this === "object");
 | |
|   assert(this === globalThis);
 | |
| 
 | |
|   function Foo() {
 | |
|     this.x = 5;
 | |
|     assert(typeof this === "object");
 | |
|     assert(this.x === 5);
 | |
|   }
 | |
| 
 | |
|   new Foo();
 | |
|   console.log("PASS");
 | |
| } catch (err) {
 | |
|   console.log("FAIL: " + err);
 | |
| }
 | 
