cpr.core.AppHook

It is an interface that can intervene in the process of loading and initializing the app.

Index

Methods
Name Return Type Description
onCreate You can personalize the behavior immediately after all components of the app instance are created.
onLoad When making an app load request, you can include additional resource requests.
onPrepare You can request additional resources just before the app instance starts.

Methods

onCreate(app, exports)
You can personalize the behavior immediately after all components of the app instance are created.
Parameters
name type description
app AppInstance The app instance to be launched.
exports Object The publishing interface of the app to be launched. (App properties and app methods)
onLoad(appId, loader)
When making an app load request, you can include additional resource requests.
Parameters
name type description
appId String ID of the app to load.
loader ResourceLoader Resource loader.
onPrepare(app, loader)
You can request additional resources just before the app instance starts.
Parameters
name type description
app AppInstance The app instance to be launched.
loader ResourceLoader Resource loader.