Fix #593, provide view object to background scripts.