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

Whenever an iframe changes location Hypothesis needs to be injected again #6475

Open
jwgmeligmeyling opened this issue Jul 27, 2024 · 2 comments

Comments

@jwgmeligmeyling
Copy link

When enabling annotations on an iframe with the enable-annotation attribute, it appears the client is only injected once. This leads to issues when the frame navigates to another page. I haven't checked whether the issue exists for all types of navigation (for example if it matters if the parent or the frame itself is causing the navigation). In this particular case the frame was initialised with about:blank.

@robertknight
Copy link
Member

In this particular case the frame was initialised with about:blank.

We have code that is supposed to handle this use case and avoid the overhead of redundantly loading the client into an about:blank frame. See hasBlankDocumentThatWillNavigate. Can that solve your use case with some extensions?

@jwgmeligmeyling
Copy link
Author

I presume the hasBlankDocumentThatWillNavigate in this case wasn't sufficient because the <iframe> had no src set but instead got it assigned through either element.setAttribute or contentWindow.location. Any ideas how to solve this differently than registering a load event handler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants