Skip to content

Add support for finding targets in auxilary browsing contexts #1218

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

Merged

Conversation

TheJayMann
Copy link
Contributor

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

This is an update to the previous pull request that covers a missing piece for targeting a frame within a new window from the original window. It also updates new windows to be a child of the top most browsing context to emulate auxilary browsing contexts within a browsing group.

After performing a recursive depth first search for a target on all
browsing contexts starting from the first and continuing until the
top-most, then all auxilary browsing context should be searched.  Also,
any new child context created which is not a frame context should be an
auxilary browsing context, and added as a direct child of the top-most
browsing context, rather than the browsing context attempting to create
it.  The order for searching auxilary browsing contexts is currently up
to the implementation to decide, so long as it is consistent.  The order
chosen in this implementation is the order the auxilary browsing
contexts were created.
Copy link
Contributor

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks a lot!

@FlorianRappl FlorianRappl merged commit 7fa4d5f into AngleSharp:devel Feb 2, 2025
5 checks passed
@TheJayMann TheJayMann deleted the issue-1205-iframe-targets-2 branch February 2, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants