function safeDispatchEvent(target, event) {
  var check = 'on' + event.type.toLowerCase();
  if (typeof target[check] === 'function') {
    target[check](event);
  }
  return target.dispatchEvent(event);
}
Dispatches the passed event to both an "on<type>" handler as well as via the
normal dispatch operation. Does not bubble.

@param {!EventTarget} target
@param {!Event} event
@return {boolean}