src/mdlComponentHandler.js
function createEvent_(eventType, bubbles, cancelable) {
    if ('CustomEvent' in window && typeof window.CustomEvent === 'function') {
      return new CustomEvent(eventType, {
        bubbles: bubbles,
        cancelable: cancelable
      });
    } else {
      var ev = document.createEvent('Events');
      ev.initEvent(eventType, bubbles, cancelable);
      return ev;
    }
  }
function createEvent_(eventType, bubbles, cancelable) {
    if ('CustomEvent' in window && typeof window.CustomEvent === 'function') {
      return new CustomEvent(eventType, {
        bubbles: bubbles,
        cancelable: cancelable
      });
    } else {
      var ev = document.createEvent('Events');
      ev.initEvent(eventType, bubbles, cancelable);
      return ev;
    }
  }
function createEvent_ ( eventType , bubbles , cancelable ) { if ( 'CustomEvent' in window && typeof window . CustomEvent === 'function' ) { return new CustomEvent ( eventType , { bubbles : bubbles , cancelable : cancelable } ) ; } else { var ev = document . createEvent ( 'Events' ) ; ev . initEvent ( eventType , bubbles , cancelable ) ; return ev ; } }
Create an event object.

@param {string} eventType The type name of the event.
@param {boolean} bubbles Whether the event should bubble up the DOM.
@param {boolean} cancelable Whether the event can be canceled.
@returns {!Event}
Create an event object .