The fromRect() static method of the object with a given location and dimensions.
fromRect()
MDN Reference