I have an HTML 5 page with an iframe named "IFRAMENAME". I can copy the contents of the iframe to the clipboard in IE using this simple code:

var r = document.IFRAMENAME.document.body.createTextRange( );
r.execCommand("Copy");

However, this to not work in any other browser. FF 41+ claims to allow access to the clipboard, but "createTextRange()" is only an IE function.

So, does any one know how to copy the contents of the contents of IFRAMENAME to the clipboard in all (or most) browsers?

Thanks.