“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!
The Flow framework:
XMLHttpRequest for all modern browsers** optional
The Flow framework is tiny. Don’t believe it? See for yourself.
Pick and choose only what you need for maximum kilobyte-crunchosity.
Flow aims for Dom Level 3 compatibility with:
Find all: ul.checked li
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);
});
});
var lis = document.getByClass("checked").filter(function(e) {
return e.elementName() == "ul";
}).getByTag("li");
var lis = document.querySelectorAll("ul.checked li");
The Flow source code is available on Google Code: http://code.google.com/p/flowjs/.
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.