tion useMutationObserver(flush) {
          let iterations = 0;
          const observer = new BrowserMutationObserver(flush);
          const node = document.createTextNode('');
          observer.observe(node, { characterData: true });

          return () => {
            node.data = (iterations = ++iterations % 2);
          };
        }

        const wait = (function() {
            let resolve = null;
            const trigger = useMutationObserver(() => {
                resolve();
            });
 