Added document level exit functions to the release
method:
https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api