echo icon indicating copy to clipboard operation
echo copied to clipboard

Getting error "TypeError: root.removeEventListener is not a function" when using RequireJS

Open hilja opened this issue 9 years ago • 1 comments

I'm trying to load the script with RequiJS and I get and error "TypeError: root.removeEventListener is not a function".

My config.js file:

require.config({
    paths: {
        echo: '../../dist/lib/echo'
    },
    deps: ['modules/app']
});

Then in app.js:

define(function(require) {
    var echo = require('echo');
    echo.init({
        offset: 100,
        throttle: 250,
        unload: false,
        callback: function(el, op) {
            el.style.opacity = 1;
        }
    });
}

hilja avatar Mar 19 '15 10:03 hilja

I use the webpack to require echo, meet the same problem.

Hancoson avatar Oct 24 '16 01:10 Hancoson