MetaMask / metamask-snaps-beta

Fork of MetaMask that supports plugins! Read the Wiki!
https://github.com/MetaMask/metamask-snaps-beta/wiki
MIT License
144 stars 57 forks source link

alert, confirm and prompt methods don't work on Firefox #110

Closed xuhcc closed 5 years ago

xuhcc commented 5 years ago

Describe the bug

It seems that on Firefox, alert(), confirm() and prompt() are not allowed in background scripts:

alert() is not supported in background windows; please use console.log instead.        background.js:1:47278
MetaMask Notice:
http://localhost:8081/package.json States:
Hello, localhost!        background.js:1:47278
TypeError: window.gBrowser is undefined        PromptParent.jsm:182:21

To Reproduce

Execute wallet.send({ method: 'prompt', params: ['test'] }); from a plugin module.

Expected behavior

I expected these methods to show dialog boxes.

Browser details (please complete the following information):

rekmarks commented 5 years ago

@xuhcc, thank you for bringing this to our attention. We have plans to add a more comprehensive notification API that will be compatible with all browsers. This will unfortunately have to wait until we get around to that.

In related news, we've decided to make Google Chrome (and by extension, probably up-to-date Chromium browsers as well) the only officially supported browser for beta at this time. We will fully support Firefox as we approach the launch date sometime in 2020.