on user exit without complete throw error#192
on user exit without complete throw error#192alfredosalzillo wants to merge 6 commits intodozoisch:masterfrom
Conversation
|
check this plz |
hartzis
left a comment
There was a problem hiding this comment.
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"]') |
There was a problem hiding this comment.
💭 🤔 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"] }); |
There was a problem hiding this comment.
📓 it also appears that if frame is null, from an unfound querySelector, the .observe methods errors.
fix #180
When a user exits without complete the challenge throw error.