Method signature

Resize application’s container iframe. Width parameter is ignored for all applications.

FAPI.UI.setWindowSize(width, height);
  • width - container iframe width (100-760)
  • height - container iframe height (100-4000)

Example usage

function setWindowSize(width, height){
    if ((width >= 100) && (width <= 760) && (height >= 100) && (height <= 4000)) {
        FAPI.UI.setWindowSize(width, height);
    } else {
        alert("Invalid window size!");
    }
}

Callback example

Client callback is not supported for this method.

How it works

  • For games running in full screen mode, the width setting is not taken into account;
  • For games that do not run in full screen mode, the width parameter is taken into account;
  • The width is measured to the minimum/maximum value if the width parameter does not fall within the acceptable range of values:
    • The width will change to 100, if the value 75 is passed;
    • The width will change to 760, if the value 900 is passed.