toddmotto/echo — pull request #53 by davidrapson (2014-06-15 09:06:19+00:00)
Title: Fix error when using as AMD module

This module currently breaks when used as an AMD module (at least in RequireJS) as the first argument passed to `factory` from `define` is a reference to `require` not `window`, and so means that `addEventListener` is unavailable. If you switch this to pass a function to define which then returns `factory` with `root` passed correctly it works OK.