[Webkit-unassigned] [Bug 258820] Private Browsing Detection from JS in Safari
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 3 12:50:16 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=258820
--- Comment #1 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
(function () {
"use strict";
function isPrivate(flag) {
document.getElementById("status").textContent = flag ? "Yes" : "No";
}
window.indexedDB.open("test", 1).onupgradeneeded = function(event) {
const db = event.target.result;
const objectStore = db.createObjectStore("test", { autoIncrement: true });
try {
objectStore.put(new Blob());
isPrivate(false);
} catch (error) {
const message = error.message;
isPrivate(typeof message === "string" && /BlobURLs are not yet supported/.test(message));
} finally {
db.close();
window.indexedDB.deleteDatabase("test");
}
};
})();
____________
This is JS used by website leveraging IndexedDB.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230703/b0aec727/attachment-0001.htm>
More information about the webkit-unassigned
mailing list