Search
Collective #505
4.4.2019
CSSBattle * Yet Another JavaScript Framework * x-ray * A progressive disclosure component * Gimli
Collective #505 was written by Pedro Botelho and published on Codrops
Používáme knihovnu Readability na serveru
4.4.2019
Možná znáte Readability z reader-view v prohlížeči. Odstraní ze stránky přebytečný balast a zůstane jen dobře čitelný text. Stejný projekt lze s úspěchem použít i na serveru. Pojďme si ukázat, proč i servery potřebují dobře čitelné texty
Responsible JavaScript
3.4.2019
We just made a note about this article by Jeremy Wagner in our newsletter but it’s so good that I think it’s worth linking to again as Jeremy writes about how our obsession with JavaScript can lead to accessibility and performance issues:
What we tend to forget is that the environment websites...
React Starter: React Prerequisites and 4 ES6 Things to Know
2.4.2019
JavaScript has come a long way in the past decade, especially with the ES6 update.
JavaScript’s standardized name is ECMA Script and this version came in 2015. It was named ES2015 o
KV Storage
1.4.2019
localStorage is...
Good! It's an incredibly easy API to use.
localStorage.setItem('name', 'Chris'); let name = localStorage.getItem('name');
Bad! Philip Walton explains why:
localStorage is a synchronous API that blocks the main thread, and any time you access it you potentially prevent your...
Yet Another JavaScript Framework
1.4.2019
On March 6, 2018, a new bug was added to the official Mozilla Firefox browser bug tracker. A developer had noticed an issue with Mozilla's nightly build. The report noted that a 14-day weather forecast widget typically featured on a German website had all of a sudden broken and disappeared. Nothing...
A historical look at lowercase defaultstatus
1.4.2019
Browsers, thank heavens, take backward compatibility seriously.
Ancient websites generally work just fine on modern browsers. There is a way higher chance that a website is broken because of problems with hosting, missing or altered assets, or server changes than there is with changes in...
Differential Serving
1.4.2019
There is "futuristic" JavaScript that we can write. "Stage 0" refers to ideas for the JavaScript language that are still proposals. Still, someone might turn that idea into a Babel plugin and it could compile into code that can ship to any browser. For some of these lucky proposals, Stage 0 becomes...
Scroll-Linked Animations
29.3.2019
You scroll down to a certain point, now you want to style things in a certain way. A header becomes fixed. An animation triggers. A table of contents appears. To do anything based on scroll position, JavaScript is required right now. You watch the scroll position via a DOM event and alter...
JavaScript Glossary: String lastIndexOf()
27.3.2019
Basics
The lastIndexOf() method returns the last position within a String object which an element can be found. The search starts from the last position of the String object.
JavaScript Glossary: String match()
27.3.2019
Basics
This method is a called against a regular expression and returns the matching values in the string. The return value is an array containing the matched values. If no matches are fo
JavaScript Glossary: String startsWith()
27.3.2019
Basics
The startsWith method takes a string parameter and checks if the calling string starts with the value provided. It returns a Boolean value, true
JavaScript Glossary: String toLowerCase()
26.3.2019
Basics
The toLowerCase() String method converts a string object to lower case. The return value of the method is the value of the calling string in lower case
JavaScript Glossary: String length
26.3.2019
Basics
The length property of the String object returns the number of code points in a string object. It indicates the length of the string
An Illustrated (and Musical) Guide to Map, Reduce, and Filter Array Methods
26.3.2019
Map, reduce, and filter are three very useful array methods in JavaScript that give developers a ton of power in a short amount of space. Let’s jump right into how you can leverage (and remember how to use!) these super handy methods.
Array.map()
Array.map() updates each individual value in...
The Ultimate Guide to JavaScript Algorithms: Integer Reversal
26.3.2019
Reversing an integer usually comes across as an easy thing to do for most developers. However, on closer evaluation, it gets a little tricky due to certain requirements and constraints involved. Th
Understanding Event Emitters
26.3.2019
Consider, a DOM Event:
const button = document.querySelector("button");
button.addEventListener("click", (event) => /* do something with the event */)
We added a listener to a button click. We’ve subscribed to an event being emitted and we fire a callback when it does. Every time we click that...
Build a Decentralized Web Chat in 15 Minutes
25.3.2019
In this 15 minute tutorial we’re going to build a simple decentralized chat application which runs entirely in a web browser. All you will need is a text editor, a web browser, and a basic knowledge of how to save HTML files and open them in the browser. We’re going...
JavaScript Glossary: String trim()
25.3.2019
Basics
This method removes whitespaces from the start and end of the calling string. It removes spaces, tabs, no break spaces etc. It returns a new string stripped of whitespaces from both
JavaScript Glossary: String indexOf()
25.3.2019
Basics
This method checks for the first appearance of a provided string argument within the calling string and returns the index. It returns -1 if the string argument can’t be