23 lines
		
	
	
		
			548 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			548 B
		
	
	
	
		
			JavaScript
		
	
	
	
import CONSTANTS from '../system/constants.js';
 | 
						|
import { takeSnapshot } from '../system/utils.js';
 | 
						|
 | 
						|
export class Bid {
 | 
						|
    type;
 | 
						|
    puppeteer_connect;
 | 
						|
    url;
 | 
						|
    action;
 | 
						|
    page_context;
 | 
						|
 | 
						|
    constructor(type, url, puppeteer_connect) {
 | 
						|
        this.type = type;
 | 
						|
        this.url = url;
 | 
						|
        this.puppeteer_connect = puppeteer_connect;
 | 
						|
    }
 | 
						|
 | 
						|
    async handleTakeWorkSnapshot() {
 | 
						|
        if (!this.page_context) return;
 | 
						|
 | 
						|
        await takeSnapshot(this.page_context, this, 'working', CONSTANTS.TYPE_IMAGE.WORK);
 | 
						|
    }
 | 
						|
}
 |