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

Refactor query #1107

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Refactor query #1107

merged 3 commits into from
Nov 23, 2023

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Nov 22, 2023

What?

It refactors and updates the query API for elementHandle , frame and page so that we can enable strict mode. The change is internal only and doesn't affect the public API.

Why?

The change is required so that in the future when we work on an API (such as locator) that needs to work with query but allow strict mode on.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: #981

This refactor allows us to work with the injected querySelector in a
more dynamic way by allowing us to provide the strict argument
programmatically instead of it being hard coded.
This will allow us to pass in the strict flag so that when necessary
we can enable strict mode. This change will be useful when it comes to
working with APIs which need to query for a single unique element only
and otherwise fail, usually with the locator API.
browser/mapping.go Outdated Show resolved Hide resolved
ankur22 added a commit that referenced this pull request Nov 23, 2023
@ankur22 ankur22 merged commit 3c9993c into main-next Nov 23, 2023
14 checks passed
@ankur22 ankur22 deleted the refactor/query branch November 23, 2023 10:42
inancgumus pushed a commit that referenced this pull request Dec 6, 2023
inancgumus pushed a commit that referenced this pull request Dec 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants