MCPcopy Create free account
hub / github.com/bvaughn/react-virtualized / notify

Method notify

lib/utils/test/mockResizeObserver.ts:120–139  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

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}

Callers 2

observeMethod · 0.95
setElementSizeFunction · 0.80

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected