You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varsel=window.getSelection();sel.removeAllRanges();varr=document.createRange();// this: r.selectNode(somenode);// or this:r.selectNodeContents(somenode);sel.addRange(r);
has the same result, whether using selectNode or selectNodeContents, to what is copied to the clipboard:
Firefox will put the node's "outer html" to the clipboard's text/html mimetype
Chrome and Safari will put the node's "inner html" to the clipboard
In current browser implementations, doing:
has the same result, whether using
selectNode
orselectNodeContents
, to what is copied to the clipboard:See Chrome issue here
I think there needs to be a distinction, allowing developers to decide whether to include the entire node in the clipboard, or just its content.
The text was updated successfully, but these errors were encountered: