The action returns an object with two properties:
Property | Value |
"width" | A number containing the maximum possible width of HTML dialogs. |
"height" | A number containing the maximum possible height of HTML dialogs. |
For example, this object, represented in
JSON, may look like this:
{
"width": 1382,
"height": 741
}
The action does not throw exceptions.
<script>
const CS = new CSProActionInvoker();
// size the HTML dialog to 80% of the maximum possible width and height
const maxDisplayDimensions = CS.UI.getMaxDisplayDimensions()
CS.UI.setDisplayOptionsAsync({
width: maxDisplayDimensions.width * 0.8,
height: maxDisplayDimensions.height * 0.8,
});
</script>