Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div id="text" contentEditable>
    Type something in here and look at the console.
  </div>
</body>
</html>
 
var text = document.querySelector("#text");
var observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      var entry = {
        mutation: mutation,
        el: mutation.target,
        value: mutation.target.textContent,
        oldValue: mutation.oldValue
      };
      console.log("Recording mutation:", entry);
    });
  });
observer.observe(text, {
    attributes: true,
    childList: true,
    characterData: true,
    characterDataOldValue: true,
    subtree: true
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
addyosmanipro
0viewers