| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 6× 1× 51× | let options = {
// callback allowing customization of the xhr (e.g. adding custom auth headers, cors, etc)
beforeSend (/* xhr, imageId */) {
},
// callback allowing modification of newly created image objects
imageCreated (/* image */) {
},
strict: false,
useWebWorkers: true,
decodeConfig: {
usePDFJS: false
}
};
export function setOptions (newOptions) {
options = Object.assign(options, newOptions);
}
export function getOptions () {
return options;
}
|