We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 819ca9c commit 8b7a90aCopy full SHA for 8b7a90a
1 file changed
catalyst/src/bind.ts
@@ -12,6 +12,12 @@ export function bind(controller: HTMLElement) {
12
bindActionsToController(controller, el)
13
}
14
15
+ // Also bind the controller to itself
16
+ if (controller.matches(actionAttributeMatcher)) {
17
+ bindActionsToController(controller, controller)
18
+ }
19
+}
20
+
21
// Bind the data-action attribute of a single element to the controller
22
function bindActionsToController(controller: HTMLElement, el: Element) {
23
const tag = controller.tagName.toLowerCase()
0 commit comments