(function (window, document) {
window.doStuff = function () {
document.body.innerHTML = 'Stuff has been done';
};
})(window, document);