renweb-api
v0.1.0
Published
TypeScript/JavaScript API bindings for the RenWeb Engine desktop app runtime.
Maintainers
Readme
renweb-api
The official TypeScript/JavaScript API package for RenWeb Engine. Provides typed bindings, interfaces, and utility functions for the window.renweb.* runtime available inside RenWeb desktop application pages.
Installation
npm:
npm install renweb-apiDeno / JSR:
deno add @spur27/renweb-apiOr fetch the files directly with the CLI:
rw fetch apiUsage
import * as RenWeb from "renweb-api";
// Wait for the engine runtime to be ready
(window as RenWeb.RenWebWindow).renweb.onReady = async () => {
const size = await RenWeb.Properties.getSize();
console.log(`Window: ${size.width}x${size.height}`);
await RenWeb.Window.changeTitle("My App");
const home = await RenWeb.FS.readFile("data/config.txt");
console.log(home);
};API Namespaces
| Namespace | Description |
|-----------|-------------|
| Properties | Get/set window properties: size, position, title bar, opacity, fullscreen, resizable, etc. |
| Window | Window management: show/hide, focus, change title, open new windows |
| Log | Send log messages to the C++ backend (trace, debug, info, warn, error, critical) |
| FS | Filesystem operations: read/write files, list directories, path utilities |
| Config | Read and write values in config.json at runtime |
| System | System-level calls: clipboard, shell commands, notifications, system info |
| Debug | Debug utilities for inspecting the runtime environment |
| Network | HTTP requests and WebSocket connections from the frontend |
| Application | Application lifecycle: close, hide, restart |
| Navigate | Navigate between pages within the RenWeb application |
| Utils | Helper functions: encode and decode for base64 data exchange with C++ |
Types
RenWebWindow— extendsWindowwith therenwebruntime objectRenWebCallbacks— interface for lifecycle callbacks (onReady, etc.)
License
Copyright (C) 2025 spur27 — Boost Software License 1.0
