This topic describes other API operations supported by EdgeRoutine (ER).
URL
For more information about the URL operation, see URL.
URLSearchParams
For more information about the URLSearchParams operation, see URLSearchParams.
TextDecoder
For more information about the TextDecoder operation, see TextDecoder.
TextEncoder
For more information about the TextEncoder operation, see TextEncoder.
Atob
For more information about the Atob operation, see WindowOrWorkerGlobalScope.atob().
BtoA
For more information about the BtoA operation, see WindowOrWorkerGlobalScope.btoa().
setTimeout/clearTimeout/setInterval/clearInterval
For more information about the setTimeout, clearTimeout, setInterval, and clearInterval operations, see window.setTimeout.
The setTimeout and setInterval operations allow you to set a time period in milliseconds. To protect data from side-channel attacks, we recommend that you set the time period to 50 milliseconds.
Each request has a specific response time. If the specified time period is longer than the response time, an exception is thrown. For example, if the response time is 60 seconds and setTimeouts and setInterval are set to 100 seconds, an exception is thrown.
setTimeout and setInterval can be set up to 16 times for each request. Each time they are set, one quota is consumed even if you clear the value. Each time setInterval is invoked, one quota is consumed. setInterval can be invoked up to 16 times.
The preceding callback functions apply to the boundary of a request. If you cancel or terminate the request for which setTimeout or setInterval is set, they are not invoked.
setImmediate/clearImmediate
For more information about the setImmediate and clearImmediate operations, see window.setImmediate.
setImmdediate switches from one context to another context. setImmdediate can be invoked up to 16 times for each request. Each time setImmediate is set, one quota is consumed even if you clear the value.
String-related operations
utf8ToString: converts UTF-8-encoded data into strings.utf16ToString: converts UTF-16-encoded data into strings.
The buffer size of the preceding functions is limited. If you need to convert large-sized data, we recommend that you use TextEcnoder/Decoder. The input buffer size cannot exceed 1 MB. If the input buffer size is larger than 1 MB, you can call a JavaScript method to split the content.
Console
The console operation takes effect only in debugging environments. The console operation supports the following parameters in debugging environments:
info
log
error
warn
trace
assert