/*! * Copyright (c) 2025-present, Vanilagy and contributors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /** * A read-only rectangle. * * Corresponds to the DOM DOMRectReadOnly API. */ export declare class DOMRectReadOnlyPolyfill { /** * The x-coordinate of the rectangle. */ readonly x: number; /** * The y-coordinate of the rectangle. */ readonly y: number; /** * The width of the rectangle. */ readonly width: number; /** * The height of the rectangle. */ readonly height: number; /** * Creates a new DOMRectReadOnly. */ constructor(x?: number, y?: number, width?: number, height?: number); /** * The top edge of the rectangle. */ get top(): number; /** * The right edge of the rectangle. */ get right(): number; /** * The bottom edge of the rectangle. */ get bottom(): number; /** * The left edge of the rectangle. */ get left(): number; /** * Creates a DOMRectReadOnly from a DOMRectInit. */ static fromRect(other?: DOMRectInit): DOMRectReadOnlyPolyfill; /** * Serializes the rectangle to a JSON object. */ toJSON(): { x: number; y: number; width: number; height: number; top: number; right: number; bottom: number; left: number; }; }