Introduction to event loop and ReactiveX
The best way to get acquainted with event loop is through a popular library in the JavaScript world, that is, jQuery.
If you have experience working with jQuery, you can simply create (or chain) events to a simple DOM selector and then write code to handle those specific events. For example, you could create an onClick
event by attaching it to a specific link and then code what will happen when that link is clicked.
If you're familiar with jQuery, the code to control a link that has the ID someLink
would look something like the following:
HTML:
< a href="some url" id="someLink">
JavaScript:
$("#someLink").on('click', function() { //some code here });
In the preceding code snippet, every time jQuery finds an ...
Get PHP 7 Programming Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.