0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00
denoland-deno/runtime/js
Andreu Botella 676565c711
refactor(runtime): Use util.nonEnumerable to define console (#11982)
A comment in `runtime.js` reads that `console` seems to be "the only one
that should be writable and non-enumerable", which explains why it is
declared with `util.writable` but then has its property descriptor's
`enumerable` key changed to false.

But it is not in fact true that `console` is the only global property
for which this holds, and it wasn't even when this behavior was
introduced in denoland#9013. All WebIDL interfaces are also writable and
non-enumerable – the only difference here being that `console` is a
namespace rather than an interface.

Since WebIDL interfaces are defined with `util.nonEnumerable`, and
`console` uses the same descriptor keys, this PR changes the definition
of `console` to use `util.nonEnumerable` as well.
2021-09-12 00:20:30 +02:00
..
01_build.js refactor: use primordials in runtime/, part1 (#11241) 2021-07-03 16:58:08 +02:00
01_errors.js refactor: use primordials in runtime/, part1 (#11241) 2021-07-03 16:58:08 +02:00
01_version.js refactor: use primordials in runtime/, part1 (#11241) 2021-07-03 16:58:08 +02:00
01_web_util.js fix: align DedicatedWorkerGlobalScope event handlers to spec (#11353) 2021-07-10 23:32:10 +02:00
06_util.js feat(workers): Make the Deno namespace configurable and unfrozen (#11888) 2021-08-31 19:33:03 +02:00
11_workers.js Don't drop messages from workers that have already been closed (#11913) 2021-09-06 11:05:02 +02:00
12_io.js refactor: introduce primordials for ext/web (#11228) 2021-07-03 21:32:28 +02:00
13_buffer.js refactor: use primordials for 13_buffer.js and 30_fs.js (#11247) 2021-07-03 17:17:23 +02:00
30_fs.js feat(unstable): Add file locking APIs (#11746) 2021-08-24 15:21:31 +02:00
30_metrics.js refactor(deno): remove concept of bin & json ops (#10145) 2021-04-12 15:55:05 -04:00
30_os.js feat(runtime): implement navigator.hardwareConcurrency (#11448) 2021-07-29 21:45:11 +02:00
40_compiler_api.js refactor: use primordials in runtime/, part2 (#11248) 2021-07-04 00:17:52 +02:00
40_diagnostics.js chore: use strict mode for internal runtime, core, and op_crates js (#9391) 2021-02-04 23:18:32 +01:00
40_error_stack.js refactor(deno): remove concept of bin & json ops (#10145) 2021-04-12 15:55:05 -04:00
40_files.js refactor: use primordials in runtime/, part2 (#11248) 2021-07-04 00:17:52 +02:00
40_fs_events.js refactor: use primordials in runtime/, part2 (#11248) 2021-07-04 00:17:52 +02:00
40_http.js refactor: deno_http op crate (#11335) 2021-07-12 12:44:49 +02:00
40_permissions.js feat(fmt): add basic JS doc formatting (#11902) 2021-09-02 18:28:12 -04:00
40_process.js feat(unstable): clean environmental variables for subprocess (#11571) 2021-08-04 21:47:43 +02:00
40_read_file.js feat(core): support AbortSignal in readFile (#10943) 2021-06-22 11:45:26 -04:00
40_signals.js chore: add better error message for signal API on Windows (#11935) 2021-09-07 13:17:44 +02:00
40_testing.js refactor(testing): use discrete report functions (#11917) 2021-09-05 22:42:35 +02:00
40_tty.js refactor(deno): remove concept of bin & json ops (#10145) 2021-04-12 15:55:05 -04:00
40_write_file.js feat: support AbortSignal in writeFile (#11568) 2021-08-06 10:21:29 -07:00
41_prompt.js refactor: use primordials in runtime/, part2 (#11248) 2021-07-04 00:17:52 +02:00
90_deno_ns.js BREAKING(unstable): Remove Deno.Signals enum, Deno.signals.* (#11909) 2021-09-06 10:05:33 -04:00
99_main.js refactor(runtime): Use util.nonEnumerable to define console (#11982) 2021-09-12 00:20:30 +02:00
README.md feat: add --location=<href> and globalThis.location (#7369) 2021-01-07 19:06:08 +01:00

Runtime JavaScript Code

This directory contains Deno runtime code written in plain JavaScript.

Each file is a plain, old script, not ES modules. The reason is that snapshotting ES modules is much harder, especially if one needs to manipulate global scope (like in case of Deno).

Each file is prefixed with a number, telling in which order scripts should be loaded into V8 isolate. This is temporary solution and we're striving not to require specific order (though it's not 100% obvious if that's feasible).

Deno Web APIs

This directory facilities Web APIs that are available in Deno.

Please note, that some implementations might not be completely aligned with specification.

Some Web APIs are using ops under the hood, eg. console, performance.

Implemented Web APIs