MobileCRM.Bridge.getWindowSize - Resconet/JSBridge GitHub Wiki

[v8.0] Returns the size of the window in logical pixels without any scaling and viewport calculations..

Arguments

Argument Type Description
callback function(obj) The callback function that is called asynchronously. Gets an object with the window "width" and "height".
errorCallback function(errorMsg) The errorCallback which is called asynchronously in case of error.
scope Object The scope for callbacks.

This example demonstrates how to get the window "width" and "height".

MobileCRM.bridge.getWindowSize(function (obj) {
	MobileCRM.bridge.alert("window size : " + obj.width + " x " + obj.height);
}, MobileCRM.bridge.alert);