Tag: javascript
-
2021 April 26
-
Spying on Big Sonic Heaven
A little over a year ago, one of my favorite radio DJs, Darren Revell, started up a new streaming radio station named Big Sonic Heaven. I got the idea to try building a Spotify playlist collected from the music he plays. My quick & dirty program for doing that turned 1-year-old on April 24 and the playlist has collected over 2000 songs, so far. [ ... 1443 words ... ]
-
2014 October 23
-
Playing with a node.js app project layout
I'm pleased with this project layout for a node.js-based web client / server app. [ ... 296 words ... ]
-
2013 January 23
-
Naming Things: CamelCase vs snake_case
I’ve contributed code to a number of projects, often as a drive-by bug fix in a GitHub pull request. And, usually, I’ll try to do as the Romans do and follow the local naming and coding conventions. But, sometimes, I’ll fall back to my personal conventions and get dinged in the code review. [ ... 561 words ... ]
-
2009 July 15
-
HTML5 drag and drop in Firefox 3.5
Oh hey, look! It's another blog post—and this one is cross-posted on hacks.mozilla.com. I won't say this is the start of a renewed blogging habit, but let's see what happens. Drag and drop is one of the most fundamental interactions afforded by graphical user interfaces. In one gesture, it allows users to pair the selection of an object with the execution of an action, often including a second object in the operation. It's a simple yet powerful UI concept used to support copying, list reordering, deletion (ala the Trash / Recycle Bin), and even the creation of link relationships. Since it's so fundamental, offering drag and drop in web applications has been a no-brainer ever since browsers first offered mouse events in DHTML. But, although mousedown, mousemove, and mouseup made it possible, the implementation has been limited to the bounds of the browser window. Additionally, since these events refer only to the object being dragged, there's a challenge to find the subject of the drop when the interaction is completed. Of course, that doesn't prevent most modern JavaScript frameworks from abstracting away most of the problems and throwing in some flourishes while they're at it. But, wouldn't it be nice if browsers offered first-class support for drag and drop, and maybe even extended it beyond the window sandbox? As it turns out, this very wish is answered by the HTML 5 specification section on new drag-and-drop events, and Firefox 3.5 includes an implementation of those events. If you want to jump straight to the code, I've put together some simple demos of the new events. I've even scratched an itch of my own and built the beginnings of an outline editor, where every draggable element is also a drop target—of which there could be dozens to hundreds in a complex document, something that gave me some minor hair-tearing moments in the past while trying to make do with plain old mouse events. And, all the above can be downloaded or cloned from a GitHub repository I've created especially for this article—which continues after the jump. [ ... 3204 words ... ]
-
2008 November 01
-
An unnecessary Template Attribute Language
[ ... 604 words ... ]
-
2008 September 01
-
Writing a Delicious command for Ubiquity
In my last post, I got all fluffy about how cool Ubiquity is but didn't share any code to prove the point. As it happens, I have come up with at least one useful command that I'm starting to use habitually in posting bookmarks to Delicious. You can subscribe to my command or check out the full source—this post will serve as a dissection of the thing. Since this will be fairly lengthy, follow along after the jump. Oh, and it's been awhile since I posted something this in-depth around here, so feel free to let me know how this first draft works. And, bug reports and patches are of course welcome. [ ... 3181 words ... ]
-
2008 August 31
-
Ubiquity cracks open personal mashup tinkering
[ ... 1079 words ... ]
-
2006 December 20
-
do not taunt happy fun JSON
[ ... 442 words ... ]
-
2006 December 19
-
drag and drop and the missing mouseup
[ ... 169 words ... ]
-
2006 November 12
-
XoxoOutliner shows some signs of life
[ ... 277 words ... ]
-
2006 November 06
-
XoxoOutliner rewrite coming, now with event delegation
[ ... 450 words ... ]
-
2006 October 31
-
Event Delegation based DHTML Drag and Drop?
[ ... 1149 words ... ]
-
2005 December 18
-
JS versus PHP?
[ ... 291 words ... ]
-
2005 October 08
-
DOM Scripting sounds like a fine book
[ ... 217 words ... ]