Is it a good idea to do something like this for a facebook share button..?
shareButton.onclick = () => window.open(
"https://www.facebook.com/sharer/sharer.php?u=http://example.com",
"pop",
"width=600, height=400, scrollbars=no"
)
This method seems to work, I just want to know if there is any downside to doing it this way.
I went the recommended route of adding the 'fb-root' element and facebook SDK script, but it adds an additional 0.6 seconds of page load.
That's why I am curious about the window.open method.