feat (preview) - Small change to remove $document and replace it with $window.document.