Danke!
Lösung 1 wäre also:
(function() {
'use strict';
const observer = new MutationObserver(function(mutations) {});
observer.observe(document.documentElement, {childList: true, subtree: true});
window.addEventListener('DOMContentLoaded', (event) => {observer.disconnect()})
})();
und Lösung 2:
(function() {
'use strict';
const observer = new MutationObserver(function(mutations) {
if (document.readyState == "complete"){this.disconnect();}
});
observer.observe(document.documentElement, {childList: true, subtree: true});
})();