Skip to content

Instantly share code, notes, and snippets.

@SJongeJongeJonge
Created April 6, 2021 20:11
Show Gist options
  • Save SJongeJongeJonge/7757a0c6cfdc91332bf95ced40e6995b to your computer and use it in GitHub Desktop.
Save SJongeJongeJonge/7757a0c6cfdc91332bf95ced40e6995b to your computer and use it in GitHub Desktop.
Log spf events
const events = ['spfready', 'spfclick', 'spfhistory', 'spfrequest', 'spfprocess', 'spfdone'];
const log = event => {
console.groupCollapsed(event.type);
console.log(event);
console.groupEnd(event.type);
};
events.forEach(event => window.addEventListener(event, log));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment