James is a freelance web developer based in the UK, specialising in JavaScript application development and building accessible websites. With more than a decade's professional experience, he is a published author, a frequent blogger and speaker, and an outspoken advocate of standards-based development.

James's articles

  1. Children of The DOM

    James Edwards looks at some DOM3 properties that simplify node relationships, by focusing only on element nodes and ignoring other types.

  2. Evolving a New Mutation

    James Edwards gets excited about the new MutationObserver API, and talks about how and why it’s come to replace Mutation Events.

  3. Finding an Ancestor DOM Node

    For the eighth article in this small-and-sweet functions series, I’ll be looking at a function called ancestor(). As the name suggests, this function gets a reference to a given node’s ancestor, according to a tag name and/or class match.

  4. A Study in Experimental Game Development

    How do you take a nebulous idea and turn it into a game — to get from technical details, to something interesting and challenging? Well recently, I found myself wondering whether CSS transitions could be used to make some kind of game. This article is about the exploration of that idea, and its development into […]

  5. Intelligent String Abbreviation

    For the seventh article in the small-and-sweet functions series, I’d like you show you a function called abbreviate() — the main purpose of which I’m sure you can guess! It abbreviates a string to a specified maximum length, but it does so intelligently — ensuring that the split will never occur in the middle of […]

  6. Instant Form Validation Using JavaScript

    HTML5 introduces a couple of new attributes for implementing browser-based form validation. The pattern attribute is a regular-expression that defines the range of valid inputs for textarea elements and most types of inputs. The required attribute specifies whether a field is required. For browsers that yet don’t implement these attributes, we can use their values […]

  7. Using Web Storage

    Welcome to another article in the small and sweet functions series, in which I’d like to show you a neat abstraction called domStorage(), that provides a set of convenient functions for interacting with Web Storage, while discretely handling all the most common points of failure.

  8. Fixing the details Element

    The HTML5 <details> element is a very neat construct, but it also has quite a serious usability problem – what happens if you follow a hash-link which targets inside a collapsed <details> element? The answer is nothing. It’s as if the target was hidden. But we can fix that issue with a little progressively-enhanced JavaScript, […]