I'm not sure what this statement is for. If enabled is undefined, we return true if there is a function bound to the onbeforeunload event? Why?  And why check for 'undefined'?