Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
document.addEventListener('DOMContentLoaded', () => {
naja.initialize();
naja.initialize({ history: false, selector: '[data-ajax]', customOption: 1 });
naja.fireEvent('customEvent', { extra: 1 });
naja.fireEvent('anotherEvent');
naja.addEventListener('testEvent', handler);
naja.addEventListener('someEvent', event => console.log(event.target));
naja.removeEventListener('testEvent', handler);
naja.removeEventListener('someEvent', event => {});
naja.addEventListener('otherEvent', event => console.log(event.otherProperty === 1));
});
document.addEventListener('DOMContentLoaded', () => {
naja.initialize();
naja.initialize({ history: false, selector: '[data-ajax]', customOption: 1 });
naja.fireEvent('customEvent', { extra: 1 });
naja.fireEvent('anotherEvent');
naja.addEventListener('testEvent', handler);
naja.addEventListener('someEvent', event => console.log(event.target));
naja.removeEventListener('testEvent', handler);
naja.removeEventListener('someEvent', event => {});
naja.addEventListener('otherEvent', event => console.log(event.otherProperty === 1));
});