Common API for document window size change notifications across all platforms.
Node | Description |
---|
Method | Description |
---|---|
sap.ui.Device.resize.attachHandler |
Registers the given event handler to resize change events of the document's window. The event is fired whenever the document's window size changes. The event handler is called with a single argument: a map
|
sap.ui.Device.resize.detachHandler |
Removes a previously attached event handler from the resize events. The passed parameters must match those used for registration with #.attachHandler beforehand. |
Registers the given event handler to resize change events of the document's window.
The event is fired whenever the document's window size changes.
The event handler is called with a single argument: a map mParams
which provides the following information:
mParams.height
: The height of the document's window in pixels.mParams.width
: The width of the document's window in pixels.Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function |
The handler function to call when the event occurs. This function will be called in the context of the |
|
oListener | object |
The object that wants to be notified when the event occurs ( |
Removes a previously attached event handler from the resize events.
The passed parameters must match those used for registration with #.attachHandler beforehand.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function |
The handler function to detach from the event |
|
oListener | object |
The object that wanted to be notified when the event occurred |