
-
prompt() is a Web API. The Web API is implemented by browsers that run JavaScript and prompt() is available as a global (no import needed) in those browsers. JavaScript isn't limited to browsers, however, and other runtimes exist that run in other environments. NodeJS (NodeJS) is the most popular, but it does not implement the Web API and instead has its own set of APIs that are specific to running JavaScript on the desktop. This is what onecompiler.com uses. You can see that running the following on onecompiler:
-
Nutrient
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
-
Technically you can create a C shared object and import that shared object into QuickJS, see https://github.com/rsenn/qjs-modules, also https://github.com/second-state/wasmedge-quickjs.
-
wasmedge-quickjs
A high-performance, secure, extensible, and OCI-complaint JavaScript runtime for WasmEdge.
Technically you can create a C shared object and import that shared object into QuickJS, see https://github.com/rsenn/qjs-modules, also https://github.com/second-state/wasmedge-quickjs.