I'm trying to hook into a function that comes with the File System Access API.
For example when the web site used the File System Access API as shown in below.
// store a reference to our file handle
let fileHandle;
async function getFile() {
// open file picker
[fileHandle] = await window.showOpenFilePicker();
if (fileHandle.type === 'file') {
// run file code
} else if (fileHandle.type === 'directory')
// run directory code
}
}
It is possible to hook Web APIs with JavaScript? I mean how can I stop process of the web site when it used this API?