Commit 4c9e2c57 authored by Robert Knight's avatar Robert Knight

Add a note that `copyText` may throw

parent f4d00dfc
......@@ -5,6 +5,10 @@
*
* In most browsers, this function can only be called in response to a user
* gesture. For example in response to a "click" event.
*
* @throws {Error}
* This function may throw an exception if the browser rejects the attempt
* to copy text.
*/
function copyText(text) {
const temp = document.createElement('span');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment