implement WebUIDelegate methods for javascript alert() and confirm()
sheets are nicer than panels because they stay with the window
rather than pop up alert boxes that get placed in the middle of the
screen
however, sheets return right away and use callbacks to return the
result, but since javascript apps expect the dialog to block until a
response, we have to block after the sheet is put up
to get around this, make the callback just set a variable
sheetResponse, which a while loop waits for and blocks until it
gets, which it can then return to javascript