Skip to content

Class: WebAppService ​

Small service that exposes the base URL of the Kappapps platform (the host). It acts as the anchor point for every URL built by the SDK (assets, API, viewer pages…).

Remarks ​

Available everywhere via k.webService. You never have to instantiate this service yourself — it is created by the SDK when the app/widget starts.

Example ​

ts
// Build an absolute URL to a platform asset
const url = k.webService.host + '/overlay/sounds/win.mp3';
new Audio(url).play();

Properties ​

host ​

ts
host: string;

Base URL (origin) of the Kappapps platform, e.g. https://kappapps.com.