Patch Changes
-
feat: add
_SetSourceMapRelease(errInfo)
MTS API. (#1118)You can get
errInfo.release
throughe.detail.release
in the error event callback of lynx-view.The
_SetSourceMapRelease
function is not complete yet, because it is currently limited by the Web platform and some functions and some props such aserr.stack
do not need to be supported for the time being. -
feat: add
_I18nResourceTranslation
api in mts &&init-i18n-resources
attr,i18nResourceMissed
event of lynx-view. (#1065)init-i18n-resource
is the complete set of i18nResources that need to be maintained on the container side. Note: You need to pass this value when lynx-view is initialized.You can use
_I18nResourceTranslation
in MTS to get the corresponding i18nResource frominit-i18n-resources
. If it is undefined, thei18nResourceMissed
event will be dispatched.// ui thread lynxView.initI18nResources = [ { options: { locale: 'en', channel: '1', fallback_url: '', }, resource: { hello: 'hello', lynx: 'lynx web platform1', }, }, ]; lynxView.addEventListener('i18nResourceMissed', (e) => { console.log(e); }); // mts _I18nResourceTranslation({ locale: 'en', channel: '1', fallback_url: '', });