dynamic constrain()

Constrains the size of the element to the window or fitInfo by setting max-height and/or max-width.

Source

constrain() =>
    jsElement.callMethod('constrain', []);