summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
AgeCommit message (Collapse)Author
2022-05-17BREAKING(unstable): Enable Deno namespace in workers by default (#14581)Nayeem Rahman
This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default.
2022-05-14feat: add userAgent property to Navigator's prototype (#14415)randomicon00
2022-05-06feat(web): add `performance.timeOrigin` (#14489)Geert-Jan Zwiers
Add support for the `performance.timeOrigin` web API. Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
2022-05-03refactor: add core.formatLocationFilename, remove op_format_filename (#14474)Bartek Iwańczuk
This commit moves "op_format_location" to "core/ops_builtin.rs" and removes "Deno.core.createPrepareStackTrace" in favor of "Deno.core.prepareStackTrace". Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
2022-04-13feat(ext/web): Add error events for event listener and timer errors (#14159)Nayeem Rahman
- feat: Add handleable error event for even listener errors - feat: Add handleable error event for setTimeout()/setInterval() errors - feat: Add Deno.core.destructureError() - feat: Add Deno.core.terminate() - fix: Don't throw listener errors from dispatchEvent() - fix: Use biased mode when selecting between mod_evaluate() and run_event_loop() results
2022-03-19refactor: cleanup assert() & AssertionError definitions (#13859)Leo Kettmeir
2022-03-01fix(runtime): disable console color for non tty stdout (#13782)Antonio Musolino
2022-02-11compat: support --compat in web workers (#13629)Bartek Iwańczuk
Adds another callback to WebWorkerOptions that allows to execute some modules before actual worker code executes. This allows to set up Node global using std/node.
2022-02-01refactor: primordials for instanceof (#13527)Bartek Iwańczuk
2022-01-27Revert "refactor: update runtime code for primordial checks for "instanceof" ↵Bartek Iwańczuk
(#13497)" (#13511) This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
2022-01-27refactor: update runtime code for primordial checks for "instanceof" (#13497)Bartek Iwańczuk
2022-01-24feat(ext/web): add CompressionStream API (#11728)Leo Kettmeir
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-01-18feat: stabilize test steps API (#13400)David Sherret
2022-01-17fix(ext/console): don't depend on globalThis present (#13387)Bartek Iwańczuk
2022-01-09fix: expose "Deno.memoryUsage()" in worker context (#13293)Rodney van den Velden
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-11-03feat(ext/web): BYOB support for ReadableStream (#12616)Leo Kettmeir
This commit introduces support for BYOB readers in the WHATWG Streams API implementation.
2021-10-11fix(runtime): Declare `Window.self` and `DedicatedWorkerGlobalScope.name` ↵Andreu Botella
with `util.writable()` (#12378) `Window`'s `self` property and `DedicatedWorkerGlobalScope`'s `name` property are defined as Web IDL read-only attributes with the `[Replaceable]` extended attribute, meaning that their setter will redefine the property as a data property with the set value, rather than changing some internal state. Deno currently defines them as read-only data properties instead. Given that Web IDL requires all attributes to be accessor properties rather than data properties, but Deno exposes almost all of those properties as either read-only or writable data properties, it makes sense to expose `[Replaceable]` properties as writable as well – as is already the case with `WindowOrWorkerGlobalScope`'s `performance` property.
2021-10-11feat(unstable/test): imperative test steps API (#12190)David Sherret
2021-10-08refactor: deduplicate `defineEventHandler` util (#12367)Andreu Botella
2021-10-07fix(runtime): Getting `navigator.hardwareConcurrency` on workers shouldn't ↵Andreu Botella
throw (#12354)
2021-10-01fix(runtime/js/workers): throw errors instead of using an op (#12249)Nayeem Rahman
2021-09-29feat: stabilize URLPattern API (#12256)Luca Casonato
2021-09-18fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)Nayeem Rahman
Co-authored-by: Mike White <mike.white@auctane.com>
2021-09-16fix(ext/crypto): use DataError in importKey() (#12071)Divy Srivastava
2021-09-12refactor(runtime): Use `util.nonEnumerable` to define `console` (#11982)Andreu Botella
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-08feat: add URLPattern API (#11941)Luca Casonato
This adds support for the URLPattern API. The API is added in --unstable only, as it has not yet shipped in any browser. It is targeted for shipping in Chrome 95. Spec: https://wicg.github.io/urlpattern/ Co-authored-by: crowlKats < crowlkats@toaxl.com >
2021-09-06BREAKING(unstable): Remove Deno.Signals enum, Deno.signals.* (#11909)Ryan Dahl
2021-08-31feat(workers): Make the `Deno` namespace configurable and unfrozen (#11888)Andreu Botella
This is the worker counterpart of PR #11062.
2021-08-25feat: ArrayBuffer in structured clone transfer (#11840)Luca Casonato
2021-08-20chore: upgrade dlint and run `prefer-primordials` rule (#11777)Yusuke Tanaka
2021-08-16feat(runtime): support classic workers for internal testing (#11338)Andreu Botella
This commit implements classic workers, but only when the `--enable-testing-features-do-not-use` flag is provided. This change is not user facing. Classic workers are used extensively in WPT tests. The classic workers do not support loading from disk, and do not support TypeScript. Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-10feat: add experimental WebSocketStream API (#10365)Leo K
This commit adds the experimental WebSocketStream API when using the --unstable flag. The explainer for the API can be found here: https://github.com/ricea/websocketstream-explainer
2021-08-09feat(extensions/web): add structuredClone function (#11572)Leo K
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-29feat(runtime): implement navigator.hardwareConcurrency (#11448)Divy Srivastava
This commit implements "navigator.hardwareConcurrency" API, which supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
2021-07-26refactor: use `primordials` in runtime, extensions and core (#11500)Yusuke Tanaka
2021-07-23cleanup(runtime): remove last references to Deno.core.sharedQueue (#11503)Aaron O'Mullan
`Deno.core.sharedQueue` was killed in #9843
2021-07-10fix: align DedicatedWorkerGlobalScope event handlers to spec (#11353)Andreu Botella
2021-07-08chore: update wgpu to 0.9.0 (#11315)Luca Casonato
2021-07-06feat(crypto): implement generateKey() and sign() (#9614)Divy Srivastava
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-07-04fix: primordials in extensions/net and runtime/js (#11270)Simon Rask
2021-07-04refactor: use primordials in runtime/, part2 (#11248)Bartek Iwańczuk
2021-07-03feat: enable WebAssembly.instantiateStreaming and wasm async compilation ↵Andreu Botella
(#11200) The WebAssembly streaming APIs used to be enabled, but used to take buffer sources as their first argument (see #6154 and #7259). This change re-enables them, requiring a Promise<Response> instead, as well as enabling asynchronous compilation of WebAssembly modules.
2021-07-03refactor: introduce primordials for ext/web (#11228)Luca Casonato
2021-06-27feat(inspector): pipe console messages between terminal and inspector (#11134)Bartek Iwańczuk
This commit adds support for piping console messages to inspector. This is done by "wrapping" Deno's console implementation with default console provided by V8 by the means of "Deno.core.callConsole" binding. Effectively each call to "console.*" methods calls a method on Deno's console and V8's console.
2021-06-25chore(ext/console): deprecate Deno.customInspect (#10035)Yoshiya Hinosawa
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-06-22feat: transfer MessagePort between workers (#11076)Luca Casonato
Add support for transferring `MessagePort`s between workers.
2021-06-22feat: Deno namespace configurable and unfrozen (#11062)Kitson Kelly
Closes #11033
2021-06-21feat: `MessageChannel` and `MessagePort` (#11051)Luca Casonato
This commit introduces support for MessageChannel and MessagePort. MessagePorts can be transfered across other MessagePorts.