Skip to content

jquery-api's codemod incorrectly transforms click handlers #40

@runspired

Description

@runspired

example where the event name ("click") was not passed to addEventListener:

-    this.$(".nav-link").click(function () {
+    this.element.querySelectorAll(".nav-link").forEach(el => el.addEventListener(function () {
       if ($(this).hasClass("active")) {
         analyticsRunner.set("hideAnalyticsRunner", false);
       }
-    });
+    }));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions