Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API-device-user screenshot event


May 19, 2021 WeChat Mini Program Development Document


Table of contents


wx.onUserCaptureScreen(CALLBACK)

Base library 1.4.0 starts to support, and low versions need to be compatible

Listens to the user's active screen-taking event, which is triggered when the user uses the system's screen-cut button to take a screenshot

CALLBACK returns parameters:

No

Example code:

wx.onUserCaptureScreen(function(res) {
    console.log('用户截屏了')
})