Add generic support for a 'surround'.

This commit is contained in:
Dermot Duffy
2022-03-22 19:58:34 -07:00
parent b649401f11
commit a4fcf2513b
9 changed files with 370 additions and 179 deletions
+2 -2
View File
@@ -115,11 +115,11 @@ export async function homeAssistantSignPath(
* @param detail An optional detail object to attach.
*/
export function dispatchFrigateCardEvent<T>(
element: HTMLElement,
target: EventTarget,
name: string,
detail?: T,
): void {
element.dispatchEvent(
target.dispatchEvent(
new CustomEvent<T>(`frigate-card:${name}`, {
bubbles: true,
composed: true,