Failed to construct 'IntersectionObserver': member root is not of type Element.

172
1
03-18-2024 06:51 PM
yydreamyang
New Contributor

When used in Sogou browser, this error is reported. Failed to construct 'IntersectionObserver': member root is not of type Element. I looked at the source code and saw that the root attribute that listens to this is window.document, and there is no problem with Google Browser here. However, in Sogou browser, window.document.body should be used, so that the Element Element can be monitored, because root needs to establish document.body instanceof Element. So I hope the authorities can take a look at this issue.

0 Kudos
1 Reply
ReneRubalcava
Frequent Contributor

Sogou isn't in the list of supported browsers, but according to the doc, the root in IntersectionObserver can be Element or Document, as long as it has a viewport. This might be an issue in Sogou.

0 Kudos