tencent cloud

Feedback

Last updated: 2024-11-21 18:41:53

    onWindowResize

    This API is used via wx.onWindowResize(function listener).
    Feature Description: Monitors window size change events.
    Parameter and Description: function listener, the listener function for window size change events.
    Attribute
    Type
    size
    Object
    Structure Attribute of Size
    Structure attributes
    Type
    Description
    windowWidth
    number
    The changed window width, measured in pixels.
    windowHeight
    number
    The changed window height, measured in pixels (px).

    offWindowResize

    This API is used via wx.offWindowResize(function listener).
    Feature Description: Removes the listener function for window size change events.
    Parameter and Description: function listener, the listener function passed in by function listener, onWindowResize. If this parameter is not passed, all listener functions will be removed.
    const listener = function (res) { console.log(res) }
    
    wx.onWindowResize(listener)
    wx.offWindowResize(listener) // The same function object as the listener must be passed in.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support