All Products
Search
Document Center

Startup parameters

Last Updated: Feb 24, 2021

The appearance and action of the HTML5 container during running are controlled by a group of parameters. The startup parameters can be specified when you start a new instance or call pushWindow, as shown in the following figure.

  1. alipays://platformapi/startapp?appId=20000067&url=http%3A%2F%2Fm.taobao.com&showOptionMenu=NO&startMultApp=YES

In addition, the first URL of a new instance can carry a magic parameter webview_options. The content will be fetched by the container and transferred to the container.

  1. ?webview_options=showOptionMenu%3DNO&startMultApp%3DYES
  2. // urlencode('showOptionMenu=NO&startMultApp=YES') => showOptionMenu%3DNO&startMultApp%3DYES

The startup parameters passed through by the client can be obtained by the frontend through AlipayJSBridge.startupParams or jsapi:getStartupParams.

Name Abbreviation Type Description Default value pushWindow available Remarks
URL string Start URL. “” Y
defaultTitle dt string Default title, displayed on the title bar before the page is loaded for the first time. “” Y
showLoading sl string Whether to display the global loading animation before the page is loaded. The values include YES and NO. “NO” Y
readTitle rt string Whether to read the page title and display it on the title bar. The values include YES and NO. “YES” Y
bizScenario bz string Business scenario source. The value will be recorded in each event tracking to distinguish different sources. “” -
backBehavior bb string Action of the Back button. The values include back, pop, and auto.
back : Return to the previous page if browser history exists. Otherwise, the current WebView is closed.
pop: Close the current window.
auto: Equivalent to pop in iOS. In Android, this action value is equivalent to back when the toolbar is visible and is equivalent to pop when the toolbar is invisible.
The default value is “back” in general browser mode for a non-HTML5 app (app ID: 20000067), and is “pop” for an HTML5 app (started using startApp). -
pullRefresh pr string Whether pull-down refresh is supported. Valid values: YES and NO.
The value can be set to YES for only local files.
“NO” Y
toolbarMenu tm string List of more menu items (placed after the share, font size, and copy links). The value is a JSON string, for example:
{“menus”:[{“name”:”hello”,”icon”:”H5Service.bundle/h5_popovermenu_share”,”action”:”hello”},{“name”:”world”,”icon”:”H5Service.bundle/h5_popovermenu_abuse”,”action”:”world”}]}.
“” Y
showProgress sp bool Whether to display the loading progress bar. The values include YES and NO. “NO” -
canPullDown pd string Whether the screen supports slide-down (to show the black background or domain name).
The values include YES and NO, and can be set to NO for only local files.
“YES” YES
showDomain sd bool Whether to display the domain name when the screen is slid down.
The values include YES and NO. It can be set to NO only for local files, and is forcibly set to NO for offline packages, not allowed to display the domain name.
“YES” -
backgroundColor bc int Background color (in decimal, for example, bc=16775138). “” -
showOptionMenu so bool Whether to display the ellipsis (…) on the upper right. The values include YES and NO. The default value is NO for HTML5 apps and YES for non-HTML5 apps.
showTitleLoading tl bool Whether to display the small loading animation on the left side of the title bar. The values include YES and NO. NO Y
enableScrollBar es bool Whether to use the WebView scrollbars, including the vertical and horizontal ones. This parameter is valid only for Android. “YES” -