Edit in JSFiddle

let list = document.querySelector("#list");
let firstRun = true;

let callback = (mutationList) => {
  mutationList.forEach((mutation) => {
    if (firstRun) {
      switch (mutation.type) {
        case 'attributes':
          if (mutation.attributeName == 'style') {
            console.log('[list.style.backgroundColor = "coral";]');
          } else {
            console.log('[list.tabIndex = 1;]');
          }
          console.log(mutation.attributeName + " er inkluderet i attributeFilter og trigger type='attributes':");
          break;
        case 'childList':
          console.log('[list.children[1].innerHTML= "TREDJE"]');
          console.log("innerHTML trigger type='childList':");
          break;
        case 'characterData':
          console.log('[list.children[1].innerText= "ANDEN"]');
          console.log("innerText trigger type='characterData':");
          break;
      }
      console.log(mutation);
      console.log(" ");
    } else {
      console.log("mutation =", mutation);
      console.log(`Attributen \`${mutation.attributeName}\` blev ændret.`);
      let {
        width,
        height,
      } = list.style;
      let style = {
        width,
        height
      };
      console.log("style =\n", JSON.stringify(style, null, 4));


    }
  })
  firstRun = false;
}

let observer = new MutationObserver(callback);

observer.observe(list, {
  attributes: true,
  attributeFilter: ["tabindex", "style"],
  attributeOldValue: true,
  childList: true,
  characterData: true,
  characterDataOldValue: true,
  subtree: true
});




console.clear();
list.children[1].innerText = "Anden";
list.children[2].innerHTML = "Tredje";
list.style.backgroundColor = "coral";
list.tabIndex = 1;



<ul id="list"   contenteditable >
<li>Første</li>
<li>(Her kommer Anden)</li>
<li>(Her kommer Tredje)</li>
<li>Fjerde</li>
<li>Femte</li>
</ul>

Tilføj, fjern eller redigér elementer i listen for at se MutationObserver i aktion. Juster også størrelsen på list-boxen for at se ændringer i console log (F12).  
  ul {
            box-sizing: border-box;
            width: 350px;
            height: 110px;
            border: 1px solid red;
            padding: 10px;
            resize: both;
            overflow: auto;
            }