[HN Gopher] Tasks, microtasks, queues and schedules (2015)
       ___________________________________________________________________
        
       Tasks, microtasks, queues and schedules (2015)
        
       Author : rbanffy
       Score  : 91 points
       Date   : 2021-02-22 13:52 UTC (9 hours ago)
        
 (HTM) web link (jakearchibald.com)
 (TXT) w3m dump (jakearchibald.com)
        
       | cmpb wrote:
       | I didn't realize why my browsers (Firefox, iOS Safari) were
       | correctly handling the tests, despite the article indicating they
       | were not compliant. Then I realized the article is from 2015.
       | 
       | The content is still really useful, though. A good understanding
       | of JS tasks & microtasks and HTML jobs is really useful for
       | diagnosing the inevitable front-end weirdness encountered during
       | development when using any of the major frontend frameworks
       | (which contain a lot of abstraction that separates the developer
       | from these lower-level facets).
        
         | caillou wrote:
         | Good to know!
        
         | memco wrote:
         | The Safari one was only fixed about a year ago:
         | https://webkit.org/blog/10031/release-notes-for-safari-
         | techn.... I remember being excited about the release
         | specifically because of Jake Archibald calling it out.
        
       | caillou wrote:
       | Two learings on my side:
       | 
       | 1. Promises are handled in micro-tasks. 2. `element.click()`
       | causes the event to dispatch synchronously. Even on parent
       | elements.
        
       | ivankolev wrote:
       | This has been on my bookmark list since I read it many years ago
       | and I reread it whenever I have to refresh on js fundamentals.
       | Kudos for resurfacing it.
        
       | rjmunro wrote:
       | Looking at the starting example, I thought "script start" should
       | happen first. "promise2" should be after "promise1", but the rest
       | seem arbitrary, and you shouldn't be writing code where it would
       | matter.
        
         | chrismorgan wrote:
         | When you're writing UI frameworks, the differences are
         | regularly essential to understand.
        
       | tingletech wrote:
       | discussion from 2015
       | https://news.ycombinator.com/item?id=10072656
        
         | dang wrote:
         | Year added above. Thanks!
        
       ___________________________________________________________________
       (page generated 2021-02-22 23:01 UTC)