MCPcopy Index your code
hub / github.com/pyscript/pyscript / transient

Function transient

core/src/fs.js:35–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 if (options.hint) how.startIn = options.hint;
34
35 const transient = async () => {
36 try {
37 const handler = await showDirectoryPicker(how);
38 if ((await handler.requestPermission(how)) === "granted") {
39 resolve(handler);
40 return true;
41 }
42 } catch ({ message }) {
43 console.warn(message);
44 }
45 return false;
46 };
47
48 // in case the user decided to attach the event itself
49 // as opposite of relying our dialog walkthrough

Callers 1

Calls 2

resolveFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected