Call a function after an element has been created

Sometimes this is needed for a DOM element created or loaded outside of your own script, either by a different js library or an event outside of your direct control.