Hi,
I had a look this Sunday to re assess if it's possible or not to display popup, alerts, prompts within the evalInSandbox() environment.
The result is what I've already noticed in the past. It is not possible (for what I know) to play with window and prompt functions. This triggers an exception and the sandbox is exited.
It tried various methods, but no success. The log generated by the exception :
12:23:32.745 message: Permission denied for <chrome://minion> to call method ChromeWindow.prompt on <>.
fileName: chrome://minion/content/menus.js
lineNumber: 153
stack:
name: Error
So far, I try to pass the function prompt(), the object window or to create a new service nsIPromptService. The error is the same "Permission denied".
In the futur, as the custom menu is a great feature to me, I may create a "menu" plugin for mpm but not hosted by AMO. Regular users will still have access to the menu, in a way that complies with AMO safety requirements. For advanced users who have installed the additional plugin, they will be able to have higher execution privileges and additional features. they will be able to use the eval() and have more controls on their scripts.
The delivery will be done in issue 89 so everyone can track the changes :
http://code.google.com/p/musicpm/issues/detail?id=89Once this will be created, it might be possible to propose user's scripts to perform various actions. User's submitted script will be reviewed by the community and then published.
Any ideas, comment, suggestions are welcome.