Example of a full screen control. Click the control in the top right corner to go full screen. Click it again to exit full screen.
See the full-screen.js source to see how this is done.