Dispatches a custom event with an optional detail object.
Source
CustomEvent fire(String type,
{detail, bool canBubble: true, bool cancelable: true, Node node}) {
return convertToDart(jsElement.callMethod('fire', [
type,
convertToJs(detail),
new js.JsObject.jsify(
{'bubbles': canBubble, 'cancelable': cancelable, 'node': node})
]));
}