class.html">Object</a></span> <span class="parameter-name">detail</span></span> })
    </section>

    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">factory CustomEvent(String type,
    {bool canBubble: true, bool cancelable: true, Object detail}) {
  final CustomEvent e = document._createEvent(&#39;CustomEvent&#39;);

  e._dartDetail = detail;

  &#47;&#47; Only try setting the detail if it&#39;