mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:12:46 +00:00 
			
		
		
		
	LibWeb: Add {de}serialization steps for ArrayBuffers
This commit is contained in:
		
							parent
							
								
									a527f55768
								
							
						
					
					
						commit
						642802d339
					
				
					 3 changed files with 92 additions and 5 deletions
				
			
		|  | @ -10,6 +10,21 @@ | |||
|         println(structuredClone(Date.UTC(2023, 7, 23))); | ||||
|         println(structuredClone(/abc/gimsuy)); | ||||
| 
 | ||||
|         { | ||||
|             let arrayBuffer = new ArrayBuffer(6); | ||||
|             for (let i = 0; i < arrayBuffer.byteLength; ++i) { | ||||
|                 arrayBuffer[i] = i; | ||||
|             } | ||||
|             let arrayClone = structuredClone(arrayBuffer); | ||||
|             for (let i = 0; i < arrayBuffer.byteLength; ++i) { | ||||
|                 if (arrayBuffer[i] !== arrayBuffer[i]) { | ||||
|                     println("FAILED"); | ||||
|                 } | ||||
|             } | ||||
|             // FIXME: This should print something like ArrayBuffer { byteLength: 6 } | ||||
|             println(arrayClone); | ||||
|         } | ||||
| 
 | ||||
|         try { | ||||
|             structuredClone(Symbol("foo")); | ||||
|             println("FAILED") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster