AsYouWish is a browser add-on (currently Firefox only) to allow requests for browser privileges to be made from regular HTML.