“How come it’s such a pain to code in JavaScript?”

–Everyone, Everywhere

You know it’s true. Between browser wars and standards-making, the JavaScript API has evolved into a puddle of code (good band name). In the end, it’s the end user that gets to wade through the mess.

Frankly we were tired of dealing with browser quirks, mistakes or downright non-support. Enough!

Introducing Flow

The Flow framework:

  • implements the DOM Level 3 API across all modern browsers
  • extends the API with extremely useful functions*
  • animates your elements*
  • manages your cookies*
  • simplifies form management*
  • fixes XMLHttpRequest for all modern browsers*
  • and much more*

* optional

The Flow framework is tiny. Don’t believe it? See for yourself.

Download Flow 1.1

Pick and choose only what you need for maximum kilobyte-crunchosity.

Browser Compatibility

Flow aims for Dom Level 3 compatibility with:

Here’s a snippet of what can be accomplished with Flow:

Da Challenge:

Find all: ul.checked li

With Flow Core

var uls = document.getElementsByClassName("checked").filter(function(e) {
    return e.nodeName.toLowerCase() == "ul";
});

var lis = [];
uls.forEach(function(ul) {
    ul.getElementsByTagName("li").forEach(function(li) {
        lis.push(li);
    });
});

With Flow Extend

var lis = document.getByClass("checked").filter(function(e) {
    return e.elementName() == "ul";
}).getByTag("li");

With Flow Query

var lis = document.querySelectorAll("ul.checked li");

Source

The Flow source code is available on Google Code: http://code.google.com/p/flowjs/.

License

Flow is licensed under a Creative Commons Attribution-Share Alike 3.0 License. You are free to share, modify and remix our code as long as you share alike.