Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Stack window.onload functions
// Stack window.onload functions
function addLoad(func){
var old = window.onload;
func instanceof Function
&& (window.onload =
old instanceof Function
? function(){func();old()}
: func);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.