function copytoClipboard(value) {
    if (isNullOrUndefined(value)) {
      return false;
    }

    var element = createTextArea({
      value: isHTMLElement(value) ? value.textContent : value.toString(),
      readonly: true
    });

    if (!isHTMLElement(element)) {
      return false;
    }

    document.body.appendChild(element);
    element.select();
    document.execCommand('copy');
    element.remove();
    return true;
  }
/**
   * Copies selected content to clipboard
   * @param {HTMLElement|string} value
   * @returns {boolean} Value indicating whether the content has been succesfully copied to the clipboard
   * @memberof DOM
   */
Copies selected content to clipboard
@param {HTMLElement|string} value
@returns {boolean} Value indicating whether the content has been succesfully copied to the clipboard
@memberof DOM
Copies selected content to clipboard @param { HTMLElement|string } value @returns { boolean } Value indicating whether the content has been succesfully copied to the clipboard @memberof DOM
function copytoClipboard(value) {
    if (isNullOrUndefined(value)) {
      return false;
    }
    var element = createTextArea({
      value: isHTMLElement(value) ? value.textContent : value.toString(),
      readonly: true
    });
    if (!isHTMLElement(element)) {
      return false;
    }
    document.body.appendChild(element);
    element.select();
    document.execCommand('copy');
    element.remove();
    return true;
  }
function copytoClipboard ( value ) { if ( isNullOrUndefined ( value ) ) { return false ; } var element = createTextArea ( { value : isHTMLElement ( value ) ? value . textContent : value . toString ( ) , readonly : true } ) ; if ( ! isHTMLElement ( element ) ) { return false ; } document . body . appendChild ( element ) ; element . select ( ) ; document . execCommand ( 'copy' ) ; element . remove ( ) ; return true ; }
Copies selected content to clipboard
 @param {HTMLElement|string} value
 @returns {boolean} Value indicating whether the content has been succesfully copied to the clipboard
 @memberof DOM
Copies selected content to clipboard @param { HTMLElement|string } value @returns { boolean } Value indicating whether the content has been succesfully copied to the clipboard @memberof DOM