Because the script is executed on a isolated and secured environment, there are some limitations.
- Global functions like `console.log`, `setTimeout`, `setInterval`, etc. are not available
- The `fetch` function behavior is slightly different from the native `fetch` function. You just have to skip the `await response.text()` or `await response.json()` part.
// const data = await response.text() 👈 You can remove this line, it is executed by default under the hood.
```
So `response` will always have the `string` type even if the the request returns a JSON object. If you know that the response is a JSON object, you can parse it using `JSON.parse(response)`.
- You can't use `import` or `require` to import external libraries
- You don't have access to browser APIs like `window`, `document`, `localStorage`, etc. If you need to use browser APIs, you should check the `Execute on client?` option so that the script is executed on the user's browser.