The Workers runtime provides the following standardized APIs for use by Workers running at the edge.
eval()is not allowed for security reasons.
new Functionis not allowed for security reasons.
Date.now()returns the time of the last I/O; it does not advance during code execution.
Web global APIs
Base64 utility methods
EventTarget and Event
AbortController and AbortSignal
TextDecoder support UTF-8 encoding/decoding.
The URL API supports URLs conforming to HTTP and HTTPs schemes.
DecompressionStream classes support gzip and deflate compression methods.
The URLPattern API provides a mechanism for matching URLs based on a convenient pattern syntax.
When the compatibility flag is set, the property is available with the value
'Cloudflare-Workers'. This can be used, for example, to reliably determine that code is running within the Workers environment.