Can I add the script to control the windows size?

Hi all,
I want to control the windows size on katalon recoder, but i didn’t find the method, so may i add the extension script like this?
Selenium.prototype.setWindowSize = function(width, height) {

Dimension dimension = new Dimension(width, height);
driver.manage().window().setSize(dimension);

};