I never realized the native JSON implementation supports pretty printing:
JSON.stringify({ "pants": true }, null, 4);
Not bad!
Yesterday Patrick made an amazing discovery. Apparently there are real Cut / Copy / Paste events in Javascript. I didn’t believe it so I threw together this test page. It seems to work in Safari, Chrome, Firefox, IE7 and IE8. They even fire when you select File → Paste and whatnot.
The events are just “cut", “copy" and “paste" and fire for <input>’s as well as <div>’s in contenteditable mode. Too good to be true, or are we the only ones who didn’t know about these?
(Source: quirksmode.org)
loading…