Update dom.ts

pull/5524/head
pushkin 5 years ago committed by GitHub
parent 23d936705d
commit 6989450ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -261,6 +261,7 @@ export function is_crossorigin() {
export function add_resize_listener(node: HTMLElement, fn: () => void) {
if ('ResizeObserver' in window) {
// @ts-ignore https://github.com/Microsoft/TypeScript/issues/28502
const obs = new ResizeObserver(fn) as any;
obs.observe(node);
return obs.disconnect.bind(obs);

Loading…
Cancel
Save