The MutationObserver method disconnect() tells the observer to stop watching for mutations.
disconnect()
MDN Reference