code: public static void onDetach(HTMLElement element, ObserverCallback callback) {
          if (element != null) {
              BodyObserver.addDetachObserver(element, callback);
          }
      }
docs: Registers a callback when an element is removed from the document body. Note that the callback will be called
  only once, if the element is removed and re-appended a new callback should be registered.
  
  @param element  the HTML element which is going to be removed from the body
  @param callback {@link ObserverCallback}