ded/domready — pull request #25 by macu (2014-02-21 03:20:08+00:00)
Title: Rename variables and add whitespace for clarity

Removed the outer `onreadystatechange` variable (unused here; it's an event generated by AJAX requests).

Removed the outer `f` variable (used only as shorthand for `false`) because it was unnecessary (as addEventListener and removeEventListener do not require a third argument `useCapture` which is false by default) and confusing (as the flush function masked the `f` with its own `f` parameter).

Renamed the outer `fn` to `listener`, and the flush function parameter `f` to `fn` (because the `fns` variable holds pending callbacks, and so the name `fn` suggests a variable referencing a single callback).

The flush function parameter `fn` is declared as a parameter only to avoid `var fn` in the flush function body, before the while loop. Misleading at first glance, as someone may see the function signature and expect it receives an argument, but I left that alone because it seemed like a deliberate style choice of the author.

Otherwise I think the changes make the code much more readable.