mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	fix(firefox): use global eval in injected script (#9101)
This commit is contained in:
		
							parent
							
								
									2afe76d86d
								
							
						
					
					
						commit
						e03db79682
					
				| @ -1226,7 +1226,7 @@ export class Frame extends SdkObject { | ||||
|     return controller.run(async progress => { | ||||
|       const rerunnableTask = new RerunnableTask(data, progress, injectedScript => { | ||||
|         return injectedScript.evaluateHandle((injected, { info, taskData, callbackText }) => { | ||||
|           const callback = window.eval(callbackText); | ||||
|           const callback = injected.eval(callbackText); | ||||
|           return injected.pollRaf((progress, continuePolling) => { | ||||
|             const element = injected.querySelector(info.parsed, document, info.strict); | ||||
|             if (!element) | ||||
|  | ||||
| @ -89,6 +89,10 @@ export class InjectedScript { | ||||
|     this._replaceRafWithTimeout = replaceRafWithTimeout; | ||||
|   } | ||||
| 
 | ||||
|   eval(expression: string): any { | ||||
|     return global.eval(expression); | ||||
|   } | ||||
| 
 | ||||
|   parseSelector(selector: string): ParsedSelector { | ||||
|     const result = parseSelector(selector); | ||||
|     for (const part of result.parts) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Pavel Feldman
						Pavel Feldman