Calling IntersectionObserver.prototype.unobserve() for unobserved elements throws TypeMismatchError

Fixed, not yet flighted Issue #12577586

Details

Created
Jun 30, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

const observer = new IntersectionObserver(()=>{});
observer.unobserve(document.body);

This code calls unobserve() for unobserved element. Chrome and Firefox ignores this, but Edge throws TypeMismatchError.

Attachments

0 attachments

    Comments and activity

    • Issue confirmed in Edge 16.16233: http://bl.ocks.org/nolanlawson/raw/e714c2a408d4a757a99d0468b6e2baf2/. Chrome 59 and Firefox 55 both ignore an element that’s not already observed, whereas Edge throws a TypeMismatchError.

      The spec does not specify what to do in cases where unobserve() is called on a node that isn’t already observed: https://wicg.github.io/IntersectionObserver/#intersection-observer-interface

    • Microsoft Edge Team

      Changed Assigned To to “Andrew B.”

      Changed Status to “Confirmed”

      Changed Status from “Confirmed” to “Fixed”

      Changed Status from “Fixed” to “Fixed, not yet flighted”

    You need to sign in to your Microsoft account to add a comment.

    Sign in