Browser APIs
client.h
You can use browser APIs in genericjs code via the client
namespace.
cheerp/clientlib.h
clientlib.h
declares browser APIs and can be included with:
cheerp/client.h
client.h
contains helpers like the SAFE_INLINE
macro and utilities under the cheerp
namespace.
Promises and cheerp/coroutine.h
Promises can be awaited using coroutines.
For example:
Any coroutine can be wrapped into a Promise using the following snippet:
Complex types
client.h
also provides complex types like _Any
, _Union
, and _Function
.
OpenGL ES
OpenGL ES is also supported with a different header.