Javascript

Javascript

340 bookmarks
Newest
Getting To Know The MutationObserver API — Smashing Magazine
Getting To Know The MutationObserver API — Smashing Magazine
Monitoring for changes to the DOM is sometimes needed in complex web apps and frameworks. By means of explanations along with interactive demos, this article will show you how you can use the MutationObserver API to make observing for DOM changes relatively easy.
·smashingmagazine.com·
Getting To Know The MutationObserver API — Smashing Magazine
An Introduction to Promises in Javascript
An Introduction to Promises in Javascript
Promises are arguably one of the trickiest concepts to grasp in the javascript world, and even if you know how to use them, it’s difficult to explain how they actually work. This FAQ style tutorial is meant for both beginners and intermediates in the world of promises. If you’re a beginner and have trouble grasping what a promise even is, then go on ahead and start from the first question.
·sohamkamani.com·
An Introduction to Promises in Javascript
The Missing Math Methods in JavaScript - SitePoint
The Missing Math Methods in JavaScript - SitePoint
Explore some of the missing math methods in JavaScript — such as sum, product, factorial, odd and even — and how to write functions for them.
·sitepoint.com·
The Missing Math Methods in JavaScript - SitePoint
Nested Objects in JavaScript
Nested Objects in JavaScript
In today's post, we'll learn what is nested objects and how to create them in JavaScript.
·delftstack.com·
Nested Objects in JavaScript
JavaScript APIs You Don’t Know About — Smashing Magazine
JavaScript APIs You Don’t Know About — Smashing Magazine
In this article, Jaun Diego covers the least known yet extremely useful APIs, such as the Page Visibility API, Web Sharing API, Broadcast Channel API and Internationalization API. Together we will see what they are, where we should use them, and how to use them.
·smashingmagazine.com·
JavaScript APIs You Don’t Know About — Smashing Magazine
JSON Hero - A beautiful JSON viewer
JSON Hero - A beautiful JSON viewer
JSON Hero makes reading and understand JSON files easy by giving you a clean and beautiful UI packed with extra features.
·jsonhero.io·
JSON Hero - A beautiful JSON viewer
FormData - Web APIs | MDN
FormData - Web APIs | MDN
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the fetch() or XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
·developer.mozilla.org·
FormData - Web APIs | MDN
How and why we removed jQuery from GOV.UK
How and why we removed jQuery from GOV.UK
Removing jQuery from GOV.UK was a huge yet manageable task that led to improved code and performance gains across the site. This is how and why we did this work.
·insidegovuk.blog.gov.uk·
How and why we removed jQuery from GOV.UK
Custom event naming conventions
Custom event naming conventions
This week, we looked at how to create custom events with vanilla JS, and a helper function to make things a bit easier. Today, we’re going to look at different naming conventions for custom events. To help prevent naming collisions, it’s a good idea to prefix custom events with your library or project name. // Namespaced to the Calculator library emit('calculator-add'); One common naming convention is kebab-case. // kebab-case naming emit('calculator-add'); Another convention is to put a colon (:) between the library name and the event type.
·gomakethings.com·
Custom event naming conventions
Custom events with vanilla JS
Custom events with vanilla JS
JavaScript provides developers with a way to emit custom events that developers can listen for with the Element.addEventListener() method. We can use custom events to let developers hook into the code that we write and run more code in response to when things happen. They provide a really flexible way to extend the functionality of a library or code base. Today, we’re going to learn how they work. Let’s dig in!
·gomakethings.com·
Custom events with vanilla JS
Modern Javascript: Everything you missed over the last 10 years
Modern Javascript: Everything you missed over the last 10 years
JavaScript has come a long way since I knew it as the “D” in DHTML. For anyone like me, who’s been reluctant to use the latest syntax that could require polyfills or a transpiler, I’ve written this cheatsheet to get you caught up on all the goodness that’s widely supported in modern browsers.
·turriate.com·
Modern Javascript: Everything you missed over the last 10 years
JavaScript: Restart all Animations of an Element
JavaScript: Restart all Animations of an Element
Recently built a demo that demonstrated a specific animation. Only problem: if you missed it, you had no way of restarting it. Instead of forcing the visitor to reload the page, this little JavaScript-snippet – attached to a button click – did the trick: const restartAnimations = ($el) = { $el.getAnimations().forEach((anim) = { anim.cancel(); anim.play(); … Continue reading "JavaScript: Restart all Animations of an Element"
·bram.us·
JavaScript: Restart all Animations of an Element