The reason why it doesn't use BB is because it was implemented before we invent BB.
I think there're two issues you addressed here:
1. Make modal dialog up to building block
-- This is pure gaia work. One way is changing the HTML tags(dangerous because code logic change is needed) and alternative is just fixing the wrapping problems.
2. Async alert. IMO this should be gecko work.
Justin, could you tell us more about this?
IMO alert/confirm/prompt should be blocking by the way we use this API:
var result = confirm('delete me');
console.log(result);
If the confirm call isn't blocking JS execution, the console here may print something unexpected.
Furthermore,
modal dialog is having some problems but they are not `blocking` before.
For instance, if we have 3 continuous alert:
alert(1);
alert(2);
alert(3);
The last two alert event would be discarded per current implementation.
But this use case is very seldom so nobody argued this.
If you guys think you have to use window.confirm to do something and find it hard to use in your case,
file a bug and c.c. me, we could find out how to solve it together.
We could continue the discussion in the bug thread if no others have different opinion on this. Too specific to be discussed here. :)
- Alive
----- 原始郵件 -----
寄件人: "Andrew Sutherland" <
asuth...@asutherland.org>
收件人:
dev-...@lists.mozilla.org
寄件箱: 2013年3 月1日, 星期五 上午 5:43:33
標題: Should we be using or avoiding window.confirm()/alert/prompt/modal dialogs?