Closed devrelm closed 6 years ago
Chrome throws an error when a non-Element is passed to unobserve():
unobserve()
const ro = new ResizeObserver(() => console.log('hello!')); ro.unobserve(null); // TypeError ro.unobserve(undefined); // TypeError ro.unobserve('cat'); // TypeError
Specifically, the error is:
Uncaught TypeError: Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element'.
This behavior is not specified in the spec, and I've opened an issue to get clarification added to the spec (WICG/ResizeObserver#53).
Fixed by #10
Chrome throws an error when a non-Element is passed to
unobserve()
:Specifically, the error is:
This behavior is not specified in the spec, and I've opened an issue to get clarification added to the spec (WICG/ResizeObserver#53).