hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Friday, 7 May, 2021 UTC

javascript: Create and Dispatch Synthetic Events

In addition to the browser creating events, it is also possible for you to create and dispatch your own events. ... more


Friday, 7 May, 2021 UTC

javascript: Stop Events

Two separate `event` object methods exist for stopping an event: `event.stopPropagation()` and `event.stopImmediatePropagation()`. This lesson will explain the differences between these two functions as well as cautioning you about some dangers in stopping ... more


Friday, 7 May, 2021 UTC

javascript: The Execution Order of Event Listeners in the Target Phase

This lesson explores some of the strangeness of the target phase, including the execution of capture and bubble phase event listeners added to the event target. ... more


Friday, 7 May, 2021 UTC

javascript: Choose an Event Listener Mechanism

Sometimes you need to use `addEventListener` to listener to particular events as there are no corresponding HTML attribute or object property event handlers for the event. ... more


Friday, 7 May, 2021 UTC

javascript: The Event Object

Event listeners are provided with an `event` object that represents an actively dispatched event. An `event` object contains lots of information and functionality related to an event. We will look at the various event properties, constants and methods ... more


Friday, 7 May, 2021 UTC

javascript: Cancel Events

In this lesson, we will look at what it means to cancel an event, why you might want to cancel an event, and how you can cancel an event. ... more


Friday, 7 May, 2021 UTC

javascript: Log Events to the Console

It is common to log `event` objects to the `console`. However, it is important to keep in mind that object properties are evaluated in objects logged to the `console` when the object is first expanded. ... more


Friday, 7 May, 2021 UTC

javascript: Remove an Event Listener with removeEventListener

`removeEventListener` removes an event listener added with `addEventListener`. However, there are a number of gotchas to watch out for in order to correctly remove an event listener. ... more


Friday, 7 May, 2021 UTC

javascript: The Execution Order of Event Listeners

It is possible to add many event listeners using different binding approaches to an `EventTarget`. In this lesson, I explain in what order event listeners will be executed in. ... more


Friday, 7 May, 2021 UTC

javascript: Understand the Relationship Between HTML Attribute and Object Property Event Handlers

Using HTML attributes event handlers and object property event handlers are related ways of expressing a single event listener binding to an element. This lesson explores the dynamics and often strangeness of that relationship. ... more


Friday, 7 May, 2021 UTC

javascript: Add an Event Listener with addEventListener

In this lesson, we explore how you can add event listeners to an event target with `addEventListener`. It will also explain how you can control aspects of your event listener binding; as well as event listener equality. ... more


Friday, 7 May, 2021 UTC

javascript: Listen to Events using Object Property Event Handlers

You can listen and respond to events on an element from within JavaScript using the object property event handlers. This lesson explores how you can add, use and remove event handlers to an element. ... more


Friday, 7 May, 2021 UTC

javascript: Listen to Events using HTML Attribute Event Handlers

It is possible for code authored in HTML attributes to be executed when a matching event is called. This lesson goes over the nuances of adding, using and removing event handlers using HTML attributes. ... more


Friday, 7 May, 2021 UTC

javascript: High-Level DOM Events Concepts

Explaining what an `event` is, how they are dispatched to `EventTargets`, and you can respond to those events by adding **event listeners**. This lesson also covers how events move through `EventTarget`'s that participate in a tree (such as elements in ... more


Friday, 7 May, 2021 UTC

javascript: Introduction to the DOM Events Course

This is a light introduction to the DOM events problem space and overview of the major topics that we will be covering. I will also introduce people to https://domevents.dev ... more


Friday, 7 May, 2021 UTC

javascript: Improve Scroll Performance with Passive Event Listeners

Some browsers treat some events added to the `body` as passive by default. However, HTML attribute event handlers on the `body` do not share these default passive values. ... more


Friday, 7 May, 2021 UTC

javascript: Debug Event Listener Performance with Chrome Developer Tools

In this lesson, we will use the Chrome performance panel to debug and fix an interaction that feels sluggish. ... more


Friday, 7 May, 2021 UTC

javascript: Debug and Inspect Event Listeners with Chrome Developer Tools

In this lesson we we will look at how you can inspect and debug event listeners in your browser by using the browser developer tools. ... more


Friday, 7 May, 2021 UTC

javascript: Synchronous and Asynchronous Events (Ordered and Unordered Events)

Events are classified as either synchronous or asynchronous (ordered or unordered). This lesson will explore what these categorisations really mean and what it means to you. ... more


Friday, 7 May, 2021 UTC

javascript: Window Reflecting Body Element Event Handlers

Some event handlers attached to the `` act as if they were attached to the `window`. ... more


Friday, 7 May, 2021 UTC

javascript: Default Passive Values on the Body Element

Some browsers treat some events added to the `body` as passive by default. However, HTML attribute event handlers on the `body` do not share these default passive values. ... more


Wednesday, 5 May, 2021 UTC

css: Use Chrome Devtools' CSS Overview to debug the CSS Design of a website

Chrome Devtools can be really powerful, when it comes to debug JavaScript, inspect DOM nodes and their properties as well as CSS styling. in this lesson we're quickly having a look at the "CSS Overview" feature of Chrome Devtools, that allows ... more


Tuesday, 27 April, 2021 UTC

typescript: Create Private Class Fields Using TypeScript's private Modifier

In this lesson, we're going over how to create private class fields using TypeScript's `private` modifier. However, as we're going to see, the `private` modifier doesn't give us any actual protection at runtime; it only exists in TypeScript's type system ... more


Tuesday, 27 April, 2021 UTC

typescript: Implement a NonNullish<T> Conditional Type in TypeScript

In this lesson, we're going to learn about conditional types, a powerful feature of TypeScript's type system. Conditional types let us express non-uniform type mappings, that is, type transformations that differ depending on a condition. A conditional ... more


Tuesday, 27 April, 2021 UTC

typescript: Create Truly Private Class Fields Using the #fieldName Syntax

This lesson introduces private class fields which (unlike regular class fields) cannot be examined or modified outside of the class they're defined in. We're going to contrast private class fields with TypeScript's `private` modifier and public class ... more


Tuesday, 27 April, 2021 UTC

typescript: Encapsulate Truly Private Variables in a Closure

Closures are an alternative to truly private class fields. If you need to encapsulate a private variable so that it can only be accessed in a controlled way, you can use a closure. This technique is particularly useful when your code has to run in older ... more


Tuesday, 27 April, 2021 UTC

typescript: Statically Type String Literals with Template Literal Types in TypeScript

In this lesson, we're going to explore template literal types, another powerful feature of TypeScript's type system. Template literal types have the same syntax as template literals in JavaScript, but they're used in type positions. Using template literal ... more


Tuesday, 27 April, 2021 UTC

typescript: Use TypeScript's Mapped Types and Template Literal Types Together

In this final lesson, we're going to dive deep into a more complex example in which we combine mapped types, key remapping, template literal types, and indexed access types to statically type a highly dynamic JavaScript function in TypeScript. ... more


Tuesday, 27 April, 2021 UTC

typescript: Use the Nullish Coalescing Operator in TypeScript

This lesson introduces the `??` operator which is known as [nullish coalescing](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator). The `??` operator produces the value on the right-hand side if (and ... more


Tuesday, 27 April, 2021 UTC

typescript: Use the Optional Chaining Operator in TypeScript

This lesson introduces the `?.` operator which is known as [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining). We're going to look at how we can use `?.` to safely descend into an object ... more