Dismisses the native splash (Lottie) loading view if it is presented.
204 when there is no splash or it was dismissed; 400 / 403 for client or scope errors.
import { SplashScreenModule, isSuccess, isErrorResponse } from '@grabjs/superapp-sdk';
const splashScreen = new SplashScreenModule();
const response = await splashScreen.dismiss();
if (isSuccess(response)) {
console.log('dismissed splash screen successfully');
} else if (isErrorResponse(response)) {
console.error(`Error ${response.status_code}: ${response.error}`);
} else {
console.error('Unhandled response');
}
JSBridge module for controlling the native splash / Lottie loading screen.
Remarks
Dismisses the splash overlay once the MiniApp is ready. Requires the Grab SuperApp WebView.
Example
ES Module:
Example
CDN (UMD):