Coder Social home page Coder Social logo

IE Support about vue-recaptcha HOT 5 CLOSED

dansnow avatar dansnow commented on July 28, 2024
IE Support

from vue-recaptcha.

Comments (5)

DanSnow avatar DanSnow commented on July 28, 2024 1

I have released v0.3.0, and it doesn't require es6-shim in IE anymore.

from vue-recaptcha.

DanSnow avatar DanSnow commented on July 28, 2024

For now, please use es6-shim to support IE.

Actually, I'm using Promise as Deferred to schedule rendering ReCAPTCHA after it load completely.
But I can implement this function by myself without Promise.
It is a possible way to drop Promise required.

Also, there is another way and I prefer this one.
I could just assume ReCAPTCHA that have been loaded. And I can direct use it in this component.
So you must place <script src="<ReCAPTCHA api>" defer></script> before this component.

If you have any other suggestion, you can leave comment below.

from vue-recaptcha.

reinerBa avatar reinerBa commented on July 28, 2024

I included es6-shim just for this task and it works :).
What do you mean with "I could just assume ReCAPTCHA that have been loaded. "? Do you suggest the script tag should not be used in head, but instead in the parent components html-template?

from vue-recaptcha.

DanSnow avatar DanSnow commented on July 28, 2024

Since script without async attribute guarantee the order of execution.
I can just use grecaptcha in this component and don't need to worry about loading complete or not.
But user must place ReCAPTCHA's api before this component.

Here is an example.

<html>
  <body>
   <div id="root"></div>
    <!-- ReCAPTCHA must be placed before -->
    <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" defer>
    </script> 
    <script src="vue.js" defer></script>
    <script src="vue-recaptcha.js defer"></script> <!-- this component -->
    <script src="main.js" defer></script>
  </body>
</html>

Actually, I have not try the way above. I'm not sure if it will work.
But I think I should try to drop the requirement of Promise and Object.assign.

from vue-recaptcha.

DanSnow avatar DanSnow commented on July 28, 2024

Yay! Now HEAD doesn't require Promise or Object.assign anymore.

from vue-recaptcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.