Specifications
The EdgeWorkers service is built on V8 and supports various ECMAScript language features implemented by the V8 JavaScript engine. APIs commonly used by web developers, that are not part of the language specification itself, are not provided by EdgeWorkers.
The following are examples of common APIs not provided by EdgeWorkers: DOM APIs, Network request APIs such as XMLHttpRequest, and the Fetch API.
JavaScript language feature modifications
Review the table below for information about updates to the JavaScript runtime security.
Feature | Update | Description |
---|---|---|
SharedArrayBuffer | removed | Sets the V8 Flag |
Code Generation | removed | Disables code generation from strings. |
System Time | modified | Prevents time from incrementing during an event handler in the JavaScript API. |
WebAssembly | removed | Sets the V8 Flag |
Considerations
The EdgeWorkers service compiles scripts as an ECMAScript 6 module. When using an ECMAScript 6 module you must enable strict mode and export the event handler functions.
Different event handlers may be executed in different instances of the JavaScript engine. As a result, writes to global JavaScript variables within event handlers are not reliably preserved across separate event handler executions.
Updated 4 months ago