Installation
npm install --save @types/resize-observer-browser
Summary
This package contains type definitions for resize-observer-browser (https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resize-observer-browser.
interface Window {
ResizeObserver: typeof ResizeObserver;
}
interface ResizeObserverOptions {
box?: "content-box" | "border-box" | "device-pixel-content-box" | undefined;
}
interface ResizeObserverSize {
readonly inlineSize: number;
readonly blockSize: number;
}
interface ResizeObserver {
disconnect(): void;
observe(target: Element, options?: ResizeObserverOptions): void;
unobserve(target: Element): void;
}
declare var ResizeObserver: {
new(callback: ResizeObserverCallback): ResizeObserver;
prototype: ResizeObserver;
};
interface ResizeObserverCallback {
(entries: ResizeObserverEntry[], observer: ResizeObserver): void;
}
interface ResizeObserverEntry {
readonly target: Element;
readonly contentRect: DOMRectReadOnly;
readonly borderBoxSize: readonly ResizeObserverSize[];
readonly contentBoxSize: readonly ResizeObserverSize[];
readonly devicePixelContentBoxSize: readonly ResizeObserverSize[];
}
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: none
Credits
These definitions were written by Chives, William Furr, and Alexander Shushunov.