I know this topic discussed many times. But this one a bit different. I need to "dispatch" a "paste" event (like after copy "paste").
Why do I need that ? Well when you copying a link into a message textarea in Facebook,you see that automatically ajax script called that alters the page so that recipient could see attached image besides the link.
since I'm not going to use Facebook API's and stuff,I just want to call the paste event that hopefully will trigger the script that I need.
Try using document.createEvent
and the necessary arguments to imitate the "paste" action (e.g. CTRL-V
).
There is likely also a "paste" event which can be created and dispatched but browser support may (will!) vary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With