Import nsPrompter.js from mozilla before modifying it
Implement webpage.onAlert, webpage.onConfirm, webpage.onPrompt