This will serve as the groundwork of merging the intersection observers and collapsible toc in the future.