react-tweet-embed icon indicating copy to clipboard operation
react-tweet-embed copied to clipboard

Replace `onload` with `addEventListener`

Open lucleray opened this issue 6 years ago • 0 comments

We're seeing the following errors on zeit.co/solutions/vue, where we're using this component:

TypeError
Cannot read property 'ready' of undefined

I believe this is happening because the "onload" event is fired before the script is evaluated, see https://stackoverflow.com/questions/16805043/why-is-script-onload-not-working-in-a-chrome-userscript.

This PR is an attempt to fix it.

lucleray avatar Nov 13 '19 15:11 lucleray