html2canvas-pro
Version:
Screenshots with JavaScript. Next generation!
19 lines • 812 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Context = void 0;
const logger_1 = require("./logger");
const cache_storage_1 = require("./cache-storage");
const origin_checker_1 = require("./origin-checker");
class Context {
constructor(options, windowBounds, config) {
this.windowBounds = windowBounds;
this.instanceName = `#${Context.instanceCount++}`;
this.config = config;
this.logger = new logger_1.Logger({ id: this.instanceName, enabled: options.logging });
this.originChecker = new origin_checker_1.OriginChecker(config.window);
this.cache = options.cache ?? config.cache ?? new cache_storage_1.Cache(this, options);
}
}
exports.Context = Context;
Context.instanceCount = 1;
//# sourceMappingURL=context.js.map