Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export morphAttrs #253

Open
mihaiav opened this issue Apr 29, 2024 · 0 comments
Open

export morphAttrs #253

mihaiav opened this issue Apr 29, 2024 · 0 comments

Comments

@mihaiav
Copy link

mihaiav commented Apr 29, 2024

Would be possible to export morphAttrs ? I find it useful on onBeforeElUpdated where only the attributes should be patched. e.g

morphdom(fromEl, toEl, {
    onBeforeElUpdated: function (fromEl, toEl) {
      if (fromEl.id === "skip" && toEl.id === "skip") {
        morphAttrs(toEl, fromEl);
        return true;
      }
    }
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant