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

Detect page title change #84

Open
TuTAH1 opened this issue Jun 4, 2022 · 5 comments
Open

Detect page title change #84

TuTAH1 opened this issue Jun 4, 2022 · 5 comments

Comments

@TuTAH1
Copy link

TuTAH1 commented Jun 4, 2022

I throught that this code will execute every time when page is changing. I was fear it can trigger itself, because it executes a function that changes itself, but it didn't work at all (for example, if I just call removeCapsFromElement(document.querySelector("title")) I can see it's changing for a split second, but when I replace it by

document.arrive( "title", {fireOnAttributesModification: true}, pageName => removeCapsFromElement(pageName))

, it doesn't work at all. Where is my mistake?

@uzairfarooq
Copy link
Owner

That’s not how it works. You need to specify selector for the element which is changing.

@TuTAH1
Copy link
Author

TuTAH1 commented Jun 5, 2022

That’s not how it works. You need to specify selector for the element which is changing.

What do you mean? title is changing and I specified a selector for it

@uzairfarooq
Copy link
Owner

I see, the current version of arrive does not support support content change. So if the text of element changes, it wont trigger arrive callback.

I think i have a little modified version of arrive which does trigger callback on content change but it depends on a jQuery selector. I can share it tomorrow if you need it.

@TuTAH1
Copy link
Author

TuTAH1 commented Jun 5, 2022

I can share it tomorrow if you need it.

Yeah, it would be great, thanks

@ZzZombo
Copy link

ZzZombo commented Nov 18, 2022

@uzairfarooq: any update? This restrict me from adopting your library currently as text changes are needed.

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

3 participants