chrec-core
Version:
ChRec's core business logic and model for testing HTML locator robustness
18 lines (17 loc) • 523 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* This class just exists, because Microsoft-Browsers and Typescript do not implement the common DOMRect object.
*/
class BoundingBox {
constructor(x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
static fromDOMRect(domRect) {
return new BoundingBox(domRect.x, domRect.y, domRect.width, domRect.height);
}
}
exports.BoundingBox = BoundingBox;