diff options
author | Andreu Botella <abb@randomunok.com> | 2021-09-12 00:20:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 00:20:30 +0200 |
commit | 676565c711d41443e25c07c0f47532eb1637830e (patch) | |
tree | 478fc849d5e1dbe1c4155442ec64700957bc738b /cli/fmt_errors.rs | |
parent | 0cb22d4cba76cf86486db3d311a6a4c61b93d953 (diff) |
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.
Diffstat (limited to 'cli/fmt_errors.rs')
0 files changed, 0 insertions, 0 deletions