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

on user exit without complete throw error #192

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alfredosalzillo
Copy link

fix #180
When a user exits without complete the challenge throw error.

@UseMuse
Copy link

UseMuse commented Nov 20, 2020

check this plz

Copy link
Collaborator

@hartzis hartzis left a comment

Choose a reason for hiding this comment

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

In addition the code comments I'm having trouble trying to understand exactly what this PR is attempting to solve.

I commented in #180 asking for a https://codesandbox.io/ example so we can see the issue. This can also help when validating changes because we can publish alpha versions from PRs to test.

Thank you for taking the time to open a PR. We want to help fix errors/bugs but need a little more detail about the issue.

if (!("MutationObserver" in window)) return original;
return new Promise((resolve, reject) => {
const frame = document
.querySelector('iframe[src*="google.com/recaptcha/api2/bframe"]')
Copy link
Collaborator

Choose a reason for hiding this comment

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

💭 🤔 we should be cautious using a querySelector reaching for a very specific recaptcha related src that could change at will by google.

observer.disconnect();
}
});
observer.observe(frame, { attributes: true, attributeFilter: ["style"] });
Copy link
Collaborator

Choose a reason for hiding this comment

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

📓 it also appears that if frame is null, from an unfound querySelector, the .observe methods errors.

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.

Case Exit google recaptcha
3 participants