---
id: fast-element.fastelement._emit
title: FASTElement.$emit() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [FASTElement](./fast-element.fastelement.md) &gt; [$emit](./fast-element.fastelement._emit.md)

## FASTElement.$emit() method

Emits a custom HTML event.

<b>Signature:</b>

```typescript
$emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  type | string | The type name of the event. |
|  detail | any | The event detail object to send with the event. |
|  options | Omit&lt;CustomEventInit, "detail"&gt; | The event options. By default bubbles and composed. |

<b>Returns:</b>

boolean \| void

## Remarks

Only emits events if the element is connected.
