Many browsers have implemented events “online” and “offline”; in addition to this, browsers also expose the navigator.onLine property that will return “online” or “offline” How many browsers is many? caniuse says every major browser (Chrome, Firefox, Safair, IE11…) except Opera mini has this functionality (as of July 4th 2018). How can I check the online status? > navigator.onLine…
All posts in Javascript
This post is not about Backbone
We’re gonna talk about video games. Imagine you’re playing Mario Kart on a four person split screen. There are four Yoshis on the screen for each player. How many Yoshis should we model? The obvious answer is four: there are four Yoshis on the screen, so there must be four Yoshis. The problem is that this answer misses…
Who is the keyword “this”?
`this` – NBA Edition The keyword `this` is a difficult javascript topic that has been debated and pondered over for centuries – more or less. Its meaning is ambiguous at first glance mainly because what the keyword `this` refers to changes depend on where it is called. Here we explore some of the various ways…