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

[Feature request] Option to watch for text change #69

Open
narcolepticinsomniac opened this issue Dec 22, 2018 · 2 comments
Open

[Feature request] Option to watch for text change #69

narcolepticinsomniac opened this issue Dec 22, 2018 · 2 comments

Comments

@narcolepticinsomniac
Copy link

Doesn't appear to be something you've added support for, unless I'm missing something.

2pl5gp

@uzairfarooq
Copy link
Owner

This could be heavy on performance but I guess still good to have if anyone wants to use it. I imagine something similar to jQuery's :contains selector:

document.arrive('.elem:contains(Hello)', (e) => {
  console.log(e);
});

Note: We don't use jQuery in the library so :contains have to be custom implemented.

@narcolepticinsomniac
Copy link
Author

.elem:contains(Hello)

Pretty sure this was exactly the use case I was referring to at the time. I've since quit using jQuery, in favor of writing my own terrible js.

Custom :contains would work, but might be confusing, given that it's heavily associated with jQuery. Either way, the goal would be to enable something like fireOnCharacterDataModification.

This isn't something I've experimented with since the OP while using arrive, so if it's already capable of firing on text change, it's a non-issue. If not, it would be a solid feature. =)

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

2 participants