From 20645b77c44d0ef11591055b8ff00473c56550fa Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 21 Jul 2020 08:32:20 +0100 Subject: [PATCH] feat: advertise Catalyst controllers with `data-catalyst` This will make styling all controllers much easier. Fixes #33 --- src/controller.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controller.ts b/src/controller.ts index 3f66eecb..5ff6293c 100644 --- a/src/controller.ts +++ b/src/controller.ts @@ -14,6 +14,7 @@ interface CustomElement { */ export function controller(classObject: CustomElement): void { wrap(classObject.prototype, 'connectedCallback', function (this: HTMLElement) { + this.toggleAttribute('data-catalyst', true) bind(this) }) register(classObject)