<!DOCTYPE html>

<script>
function createIntersectionObserver(FunctionConstructor = Function) {
    const intersectionObserver = new parent.IntersectionObserver(new FunctionConstructor(`
        if (this.isInitialEntry) {
            this.isInitialEntry = false;
            return;
        }

        this.callbackInvocations++;
    `));

    intersectionObserver.isInitialEntry = true;
    intersectionObserver.callbackInvocations = 0;
    intersectionObserver.observe(parent.intersectionObserverTestRoot, { threshold: 1 });

    return intersectionObserver;
}
</script>
