JSAPI reference

The following tables include all JSAPIs with the supported mini program type.

Basic

API name

DSL supported

H5+ supported

my.canIUse

X

my.SDKVersion

X

my.getAppIdSync

X

my.getRunScene

In-App Event

UI

TabBar

API name

DSL supported

H5+ supported

my.hideTabBar

X

my.setTabBarStyle

X

Route

API name

DSL supported

H5+ supported

my.switchTab

X

my.navigateTo

X

my.navigateBack

X

my.redirectTo

X

my.reLaunch

X

Feedback

API name

DSL supported

H5+ supported

my.alert

my.confirm

my.prompt

my.showLoading

my.hideLoading

my.showToast

my.hideToast

my.showActionSheet

Pulldown

API name

DSL supported

H5+ supported

my.startPullDownRefresh

X

onPullDownRefresh

X

my.stopPullDownRefresh

X

Contact

API name

DSL supported

H5+ supported

my.choosePhoneContact

Choose Data

API name

DSL supported

H5+ supported

my.datePicker

Animation

API name

DSL supported

H5+ supported

my.createAnimation

X

Canvas

API name

DSL supported

H5+ supported

my.createCanvasContext

X

For more information about CanvasContext, see CanvasContext Overview.

Keyboard

API name

DSL supported

H5+ supported

my.hideKeyboard

Scroll

API name

DSL supported

H5+ supported

my.pageScrollTo

X

SelectorQuery

API name

DSL supported

H5+ supported

my.createSelectorQuery

X

For more information about SelectorQuery, see SelectorQuery Overview.

Multiple Level Select

API name

DSL supported

H5+ supported

my.multiLevelSelect

Set Background

API name

DSL supported

H5+ supported

my.setBackgroundColor

Set Page Pulldown

API name

DSL supported

H5+ supported

my.setCanPullDown

Media

Image

API name

DSL supported

H5+ supported

my.chooseImage

my.previewImage

my.saveImage

my.getImageInfo

my.compressImage

Video

API name

DSL supported

H5+ supported

my.chooseVideo

my.createVideoContext

X

Lottie

API name

DSL supported

H5+ supported

my.createLottieContext

X

Recorder

API name

DSL supported

H5 supported

my.getRecorderManager

X

my.getAvailableAudioSources

X

Audio

API name

DSL supported

H5 supported

my.createInnerAudioContext

X

Storage

File

Location

API name

DSL supported

H5+ supported

my.getLocation

my.openLocation

my.chooseLocation

Map

API name

DSL supported

H5+ supported

my.createMapContext

X

my.calculateRoute

Network

Device

System Information

API name

DSL supported

H5+ supported

my.getSystemInfo

Network Status

API name

DSL supported

H5+ supported

my.getNetworkType

my.onNetworkStatusChange

X

my.offNetworkStatusChange

X

Clipboard

API name

DSL supported

H5+ supported

my.getClipboard

my.setClipboard

Watch Shake

API name

DSL supported

H5+ supported

my.watchShake

Accelerometer

Compass

API name

DSL supported

H5+ supported

my.startCompass

my.stopCompass

my.onCompassChange

my.offCompassChange

Vibrate

API name

DSL supported

H5+ supported

my.vibrate

my.vibrateLong

my.vibrateShort

Gyroscope

API name

DSL supported

H5+ supported

my.startGyroscope

my.stopGyroscope

my.onGyroscopeChange

my.offGyroscopeChange

Device Orientation

Make Phone Call

API name

DSL supported

H5+ supported

my.makePhoneCall

Capture Screen

API name

DSL supported

H5+ supported

my.onUserCaptureScreen

X

my.offUserCaptureScreen

X

Screen Brightness

API name

DSL supported

H5+ supported

my.setKeepScreenOn

my.getScreenBrightness

my.setScreenBrightness

Screen Orientation

API name

DSL supported

H5+ supported

my.getScreenOrientation

my.setScreenOrientation

Setting

API name

DSL supported

H5+ supported

my.openSetting

my.getSetting

Add Phone Contact

API name

DSL supported

H5+ supported

my.addPhoneContact

Permission Guide

API name

DSL supported

H5+ supported

my.showAuthGuide

Scan

API name

DSL supported

H5+ supported

my.scan

Memory Warning

API name

DSL supported

H5+ supported

my.onMemoryWarning

X

X

my.offMemoryWarning

X

X

Battery Information

API name

DSL supported

H5+ supported

my.getBatteryInfo

my.getBatteryInfoSync

X

Bluetooth

BLE

Bluetooth

Biometric authentication

API name

DSL supported

H5+ supported

my.checkLocalBioAuthSupported

my.startLocalBioAuth

Sharing

API name

DSL supported

H5+ supported

my.showSharePanel

Update

API name

DSL supported

H5+ supported

my.getUpdateManager

X

web-view

API name

DSL supported

H5+ supported

my.createWebViewContext

X

Open Capabilities

Other

API name

DSL supported

H5+ supported

fetchAppInfoListByKeyword

allowSystemSnapshot

my.getEnvironmentVariables

X