I am writing a user script that requires a mutation observer but also requires the CB function to execute at least once. I hate that I have to write code like
const mut = new MutationObserver(foo);
foo();
// My foo/0 doesn't return anything so I can also write
const mut = new MutationObserver(foo() || foo);
But is there a better way to write this code without triggering a mutation or calling the function directly?