Summary
mw.libs.confirmEdit.CaptchaWidget is defined as a way for other extensions and JS code to render captchas in a page. We should add hCaptcha support to it and refactor it to make it easier to use
Technical notes
- The new mw.libs.confirmEdit.CaptchaWidget class is defined such that we can implement hCaptcha support in the class
- This was needed because the methods, like creating the captcha interface and getting the captcha data fields for an API request were all synchronous operations and that does not work with hCaptcha that will execute async code during the submission process
Acceptance criteria
- mw.libs.confirmEdit.CaptchaWidget supports hCaptcha