echo
echo copied to clipboard
Getting error "TypeError: root.removeEventListener is not a function" when using RequireJS
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;
}
});
}
I use the webpack to require echo, meet the same problem.