blob: 0dd6ee4aa3e08076a40c53226884261d69f885fd [file] [log] [blame]
<!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>