angular-recaptcha icon indicating copy to clipboard operation
angular-recaptcha copied to clipboard

onRendered event

Open moravcik opened this issue 10 years ago • 1 comments

This is probably more recaptcha itself related, but I need something like onRendered event, which means an event when the recaptcha has been successfully rendered with all its content.

Now I got into situation when recaptcha API is loaded, on-create has been called, but I still wait few seconds (on slower connection) to display the recaptcha widget, which is kind of problem because I need to notify user to wait for captcha.

moravcik avatar Dec 23 '15 19:12 moravcik

Not too sure what can be done without something very hacky like trying to attach an onload listener to an iframe indirectly. I wouldn't recommend anything like that as a "feature" of the module, but if you wanted to implement it in your project, it would be easy and you wouldn't need to modify the angular-recaptcha module.

In the on-create callback, you can simple attach an onload listener to the iframe created by recaptcha. The problem is... the iframe load event may have already fired, which in that case the listener may never get triggered. Again, hacky.

TheSharpieOne avatar Feb 06 '16 05:02 TheSharpieOne