Implement the HTML5 Event Loop model.
<rdar://problem/56391803>
*** Bug 228846 has been marked as a duplicate of this bug. ***