Documentation - v7.17.0
    Preparing search index...

    Function getMutationObserverConstructor

    • Returns the native MutationObserver constructor, bypassing the Zone.js patched one when Angular is used.

      Zone.js wraps MutationObserver to propagate its async context, and with some Angular setups this makes observer callbacks run in an infinite loop, freezing the page. Using the unpatched constructor avoids it.

      Returns MutationObserverConstructor

      The original MutationObserver constructor, or window.MutationObserver when Zone.js is not present or its original cannot be retrieved. Despite the return type, this is undefined in environments without MutationObserver.