
JavaScript FormData
1. Overview This chapter is about sending HTML forms: with or without files, with additional fields and so on. FormData objects can help with that. As […]
1. Overview This chapter is about sending HTML forms: with or without files, with additional fields and so on. FormData objects can help with that. As […]
1. Overview JavaScript can send network requests to the server and load new information whenever it’s needed. For example, we can use a network request […]
1. Overview A File object inherits from Blob and is extended with filesystem-related capabilities. There are two ways to obtain it. First, there’s a constructor, similar to Blob: fileParts – is […]
1. Overview ArrayBuffer and views are a part of ECMA standard, a part of JavaScript. In the browser, there are additional higher-level objects, described in File API, […]
1. Overview What if the binary data is actually a string? For instance, we received a file with textual data. The build-in TextDecoder object allows to read […]
1. Overview In web-development we meet binary data mostly while dealing with files (create, upload, download). Another typical use case is image processing. That’s all […]
The “clickjacking” attack allows an evil page to click on a “victim site” on behalf of the visitor. Many sites were hacked this way, including Twitter, […]
The “Same Origin” (same site) policy limits access of windows and frames to each other. The idea is that if a user has two pages […]
1. Overview A popup window is one of the oldest methods to show additional document to user. Basically, you just run: …And it will open […]
Browser JavaScript execution flow, as well as in Node.js, is based on an event loop. Understanding how event loop works is important for optimizations, and sometimes […]
In this chapter we’ll cover selection in the document, as well as selection in form fields, such as <input>. JavaScript can access an existing selection, select/deselect […]
MutationObserver is a built-in object that observes a DOM element and fires a callback when it detects a change. We’ll first take a look at the […]
The browser allows us to track the loading of external resources – scripts, iframes, pictures and so on. There are two events for it: onload – […]
1. Overview In modern websites, scripts are often “heavier” than HTML: their download size is larger, and processing time is also longer. When the browser […]
The lifecycle of an HTML page has three important events: DOMContentLoaded – the browser fully loaded HTML, and the DOM tree is built, but external resources […]
The submit event triggers when the form is submitted, it is usually used to validate the form before sending it to the server or to abort the […]
Let’s cover various events that accompany data updates. 1. Event: change The change event triggers when the element has finished changing. For text inputs that means that […]
1. Overview An element receives the focus when the user either clicks on it or uses the Tab key on the keyboard. There’s also an autofocus HTML attribute that […]
Forms and control elements, such as <input> have a lot of special properties and events. Working with forms will be much more convenient when we learn them. […]
1. Overview The scroll event allows reacting to a page or element scrolling. There are quite a few good things we can do here. For instance: Show/hide […]