Release Vulpes OS 2.7-preview.24

This commit is contained in:
OverSu 2026-11-04 12:52:20 +01:00
commit 97ef99f827
135 changed files with 7717 additions and 2524 deletions

View file

@ -2,6 +2,28 @@
// real top-level browser, never by removing CSP or frame-ancestors protection.
export const Views = {
entries: new Map(),
async captureSystem(actor) {
const context = actor.browsingContext;
const uri = context?.currentWindowGlobal?.documentURI;
if (!context || context.parent || uri?.scheme !== 'http' || uri?.host !== 'system.localhost' ||
uri?.filePath !== '/index.html') {
throw new Error('SCREENSHOT_NOT_AVAILABLE');
}
const image = await context.currentWindowGlobal.drawSnapshot(null, 1, 'white');
const doc = context.top.embedderElement?.ownerDocument;
if (!doc) {
image.close();
throw new Error('SCREENSHOT_NOT_AVAILABLE');
}
const canvas = doc.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
canvas.width = image.width;
canvas.height = image.height;
canvas.getContext('2d').drawImage(image, 0, 0);
image.close();
return new Promise((resolve, reject) => {
canvas.toBlob(blob => blob ? resolve(blob) : reject(new Error('SCREENSHOT_FAILED')), 'image/png');
});
},
syncContext(entry) {
const context=entry.browser.browsingContext;
if (!context || context.id===entry.topContextId) return;