function oncopyonclick() {
  assert(copyIcon)
  assert(copiedIcon)
  assert(this instanceof HTMLButtonElement)

  const value = this.dataset.value
  assert(value !== undefined)

  this.classList.add('success')
  this.replaceChildren(copiedIcon.cloneNode(true))

  copyToClipboard(value)

  setTimeout(() => {
    this.classList.remove('success')
    this.replaceChildren(copyIcon.cloneNode(true))
  }, 2000)
}
@this {HTMLButtonElement}
  Button element.
@returns {undefined}
  Nothing.