code: function _detach() {
    if (win == null) { return; }
  
    if (win.removeEventListener) {
      win.removeEventListener('message', _onmessage, false);
    } else if (win.detachEvent) {
      win.detachEvent('onmessage', _onmessage);
    } else if (win.onmessage === _onmessage) {
      win.onmessage = null;
    }
  
    win = null;
    popups = [];
    subscribers = {};
  }
docs: removeIf(production)