(element: Element)
| 118 | } |
| 119 | |
| 120 | notify(element: Element) { |
| 121 | if (!this.#elements.has(element)) { |
| 122 | return; |
| 123 | } |
| 124 | |
| 125 | const { height, width } = elementSizes.get(element) ?? { |
| 126 | height: 0, |
| 127 | width: 0 |
| 128 | }; |
| 129 | const size = { blockSize: height, inlineSize: width }; |
| 130 | const entry = { |
| 131 | borderBoxSize: [size], |
| 132 | contentBoxSize: [size], |
| 133 | contentRect: new DOMRect(0, 0, width, height), |
| 134 | devicePixelContentBoxSize: [], |
| 135 | target: element |
| 136 | } as unknown as ResizeObserverEntry; |
| 137 | |
| 138 | this.#callback([entry], this); |
| 139 | } |
| 140 | } |
no test coverage detected