* Creates a DOMRectReadOnly from a DOMRectInit.
(other?: DOMRectInit)
| 71 | * Creates a DOMRectReadOnly from a DOMRectInit. |
| 72 | */ |
| 73 | static fromRect(other?: DOMRectInit): DOMRectReadOnlyPolyfill { |
| 74 | return new DOMRectReadOnlyPolyfill( |
| 75 | other?.x ?? 0, |
| 76 | other?.y ?? 0, |
| 77 | other?.width ?? 0, |
| 78 | other?.height ?? 0, |
| 79 | ); |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Serializes the rectangle to a JSON object. |
nothing calls this directly
no outgoing calls
no test coverage detected