How to copy text to clipboard with Javascript
Copy text to the clipboard using Clipboard API and document.execCommand('copy').
Detect width, height changes with Javascript
Use ResizeObserver Web API to detect when an elements dimension changes.