These legacy string methods take a basic string of text and wrap it in a HTML tag of the same name:
"Hello".big() // "<big>Hello</big>" "Hello".blink() // "<blink>Hello</blink>" "Hello".bold() // "<b>Hello</b>" "Hello".italics() // "<i>Hello</i>" "Hello".link("https://davidwalsh.name") // "<a href="https://davidwalsh.name">Hello</a>"
Native prototypes don’t usually remove methods and for good reason — they can break websites! I’m shocked I didn’t know about these methods before today. It’s always fun to see relics of the web past though!
“Copy to clipboard” functionality is something we all use dozens of times daily but the client side API around it has always been lacking; some older APIs and browser implementations required a scary “are you sure?”-style dialog before the content would be copied to clipboard — not great for…