-2

Was the event loop evaluation model used in web browsers to control interaction between DOM events (and later the network) concomitantly developed by Brendan Eich with JavaScript?

Or did it pre- or post-date JavaScript?

Edit: I am specifically asking about the placement of the event-loop inside browsers. I am aware the event loop is a long-standing invention.

Ben Aston
  • 53,718
  • 65
  • 205
  • 331
  • Java's early (pre-Swing) UI architecture was event based. So were things like GEM from Digital Research over a decade before that. – Pointy Apr 22 '15 at 13:39
  • [Event loops](https://en.wikipedia.org/wiki/Event_loop) predate browsers, but I'm not sure whether that is your actual question. Have you done any research? – Bergi Apr 22 '15 at 13:40
  • 1
    I'm voting to close this question as off-topic because it's really not about solving or even investigating a real or hypothetical programming problem. – Pointy Apr 22 '15 at 13:43

1 Answers1

2

The event loop predates javascript.. but just by a tiny bit.

The event loop was introduced to support progressive download of pictures in Netscape. And almost immediately it was also used to support early rendering where DOM elements are displayed on screen before all images are downloaded.

At the time, other browsers displayed blank white screen while images are downloaded. The net effect is that Netscape appears to be faster even though it takes the same amount of time to download and render the complete page.

Once the event loop is there (initially to handle network code for downloading images) javascript processing was simply added into the loop.

slebetman
  • 109,858
  • 19
  • 140
  • 171
  • Do you have a source? I was aware of the progressive download feature of Netscape Navigator, but not that the event loop was used as the underlying implementation. – Ben Aston Apr 22 '15 at 13:50
  • 1
    Not at the moment. Google will probably turn one up at some point in time. This is stuff I learned in the late 90s so it could be something from slashdot or some personal website (blogs weren't invented yet) or even paper magazines (blogs weren't invented yet). – slebetman Apr 22 '15 at 13:54
  • @BenAston: Here's the closest I can get to a reference for now. It's Douglas Crockford's talk on the DOM and he describes the evolution of the event loop: https://youtu.be/Fv9qT9joc0M?t=1841 – slebetman Apr 24 '15 at 02:29