1,676 karma · joined February 24, 2017
I don't remember the exact API, but basically an es module graph is a directed graph (e.g. edges have a direction), and because there is only one entrypoint in node, we can therefore create a hierarchy of modules. From this point on, you basically start at the root with X permissions, and from there each module can reduce the permissions of modules they import (or they can reduce their own permissions, but they can't raise them after that obviously).
"Secure" in this case refers to being able to not give deno access to the network or filesystem.
0 - Default (will be one of the below options, right now it happens to be 5)
1 - Race regular DNS and DoH, use whichever one responds first
2 - Try DoH, use regular DNS if DoH fails
3 - Use DoH, regular DNS is disabled entirely
4 - unused
5 - DoH is fully disabled, always use regular DNS
0 = use whatever the default is (one of the below)
1 = race DoH and regular dns and use whichever replies first
2 = try DoH and then fall back to regular dns
3 = only DoH
4 = unused
5 = explicitly off
The default resolver is identical to 1.1.1.1 except it collects less data: https://developers.cloudflare.com/1.1.1.1/commitment-to-priv...
Something of this sort was done a long time ago with pypy[1] and more recently CPython[2]
1: https://pypyjs.org/ 2: https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scien...
Also, the "LONG TASKS MONOPOLIZE THE MAIN THREAD. BREAK 'EM UP!" section header felt a bit on the nose.
There are so many parts that go into the accessibility of an element, handling tab index, handling keyboard input, handling screenreaders, spoken voice prompting, etc, that a custom solution usually ends up being detrimental to the user's experience.
Now in both cases, you can just make your app a fullscreen canvas or opengl/metal viewport or whatever and manually render everything to that while manually handling user input, but you lose interactivity, accessibility, extensibility, etc.