Web component to copy target text/dom-node value to clipboard
npm install copy-buttonA web-component that is not relying on Flash to copy stuff into the clipboard. Experience may vary, based on browser support, with downgrading to using prompt.
npm i --save copy-button into your htmlAfter having script ran, you're good to use in your markup.
target-text attribute on button, provided value will be copied to clipboard. Exampletarget-element attribute on button, value or text of provided DOM node will be copied to clipboard (it will be retrieved using document.getElementById if value will be specified as #specifiedID or document.querySelectorAll in other cases). See examplesBuilt on top of document.registerElement polyfill & copy-to-clipboard