# wx.onWindowResize(function callback)
Start from base library version 2.3.0. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Not supported
Listen for window size changes
# parameter
# function callback
Callback function for window size change event
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
size | Object |
size Structure
attribute | type | Introductions |
---|---|---|
windowWidth | number | Changed window width, in units px |
windowHeight | number | Changed window height, in units px |