Use window.Deferred to reach into global scope