code: function(element, options) {
      var dispatched, eventFired = false, activeElement = document.activeElement,
        that=this;
      options = options || {};
      // Focus events can't bubble
      options.canBubble = false;
      options.cancelable = false;
      if(activeElement) {
        options.type = 'blur'
        options.relatedTarget = element;
        activeElement.addEventListener(options.type, function blurListener(evt) {
          eventFired = true;
          activeElement.removeEventListener(options.type, blurListener);
        });
        activeElement.blur();
        if(!eventFired) {
          this.dispatchFocusEvent('blur', activeElement, element);
        }
        eventFired = false;
      }
      options.type = 'focus';
      element.addEventListener(options.type, function focusListener(evt) {
        eventFired = true;
        dispatched = !evt.defaultPrevented;
        element.removeEventListener(options.type, focusListener, true);
      });
      element.focus();
      if(!eventFired) {
        dispatched = this.dispatchFocusEvent('focus', element, activeElement);
      }
      return dispatched;
    }
docs: focus an element an fire blur/focus events if not done automagically