How we built it

Pause event loop during modal dialogs

When using alert(), confirm() or onbeforeunload, Chromium's old behavior was to block JS waiting for the result, but allows all declarative animations to continue. This change is to make all main-thread tasks (such as <marquee> and CSS 2d animations) also pause during this interval.

Comments

Chrome’s old behavior was implemented with a nested message loop on the Blink main thread. Any code that might ever run on a nested message loop must be robust to reentrancy and reordering, otherwise there will be stability and security bugs.

Demo

Specification

Established standard

Status in Chromium

Enabled by default (launch bug) in:

  • Chrome for desktop release 52
  • Chrome for Android release 52
  • Android WebView release 52
  • Opera release 39
  • Opera for Android release 39

Consensus & Standardization

  • No public signals
  • No public signals
  • Shipped
  • No signals

Owners

Last updated on 2016-05-27