You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few issues with PDFs in Safari. The main one is the blob type isn't supported so we can't transfer the PDF data from the tab to the background extension context. Sending the full data in the message will fail as there is a max message size for passing data between the two.
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
// load `document` from `cache`
xhr.open('GET', '', true);
// xhr.responseType = 'blob';
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
if (this.status === 200) {
// `blob` response
console.log('response', this.response);
var arrayBuffer = this.response; // Note: not oReq.responseText
var byteArray = new Uint8Array(arrayBuffer);
console.log('sending arraybuffer', byteArray);
// const blobUrl = URL.createObjectURL(this.response)
resolve(byteArray);
} else {
reject(e);
}
The text was updated successfully, but these errors were encountered:
There are a few issues with PDFs in Safari. The main one is the blob type isn't supported so we can't transfer the PDF data from the tab to the background extension context. Sending the full data in the message will fail as there is a max message size for passing data between the two.
The text was updated successfully, but these errors were encountered: