Web APIs (Browser)

The Event interface represents an event which takes place in the DOM.

An event can be triggered by the user action e.g. clicking the mouse button or tapping keyboard, or generated by APIs to represent the progress of an asynchronous task. It can also be triggered programmatically, such as by calling the HTMLElement.click() method of an element, or by defining the event, then sending it to a specified target using EventTarget.dispatchEvent().

There are many types of events, some of which use other interfaces based on the main Event interface. Event itself contains the properties and methods which are common to all events.

Many DOM elements can be set up to accept (or “listen” for) these events, and execute code in response to process (or “handle”) them. Event-handlers are usually connected (or “attached”) to various HTML elements (such as <\button>, <\div>, <\span>, etc.) using EventTarget.addEventListener(), and this generally replaces using the old HTML event handler attributes. Further, when properly added, such handlers can also be disconnected if needed using removeEventListener().

This is a sapling 🌱 in my digital garden 🏡.

Notes mentioning this note

There are no notes linking to this note.


Here are all the notes in this garden, along with their links, visualized as a graph.

Finance/Banking IdeasOrendaa wishlistTechnical Library IdeasAdaptor PatternDesign PatternsSoftware Design PrinciplesCaaS (Containers As A Service)DevOps NotesDocker Container RegistryDockerFaaS (Functions As A Service) - Serverless...IaaS (Infrastructure As A Service)KubernetesTerraformUsefulunixcommandsConcurrency vs ParallelismDistributed Service with GoDistributed System Learning NotesetcdMetrics, tracing, and loggingProtobufGoLang NotesGoLang ResourcesLearning from JPMakefileLinux NotesAanand Prasad - Creator of Fig/Docker composeMetaprogramming RubyRackDatabase SecuritySecuritySQL InjectionMVPMarket/Startup AnalysisBlue OceanHow to talk to your potential customers?How to work togetherBest way to Launch your startup (Again and Again)Business Process ModelJavascript NotesJavascript ToolsReactJSTypeScript NotesWeb APIs (Browser)Bon appétit!A note about catsTigersBackend DevelopmentBlog WishlistNotable websitesCI/CDHusky - Git commit hookConsistency is keyRedis NotesPostgresql NotesFunny / AmusingGit CLIGraphQL NotesJavascriptJSON Web Token (JWT)Move your body every dayUseful ToolsNot BehindLeslie LamportOpen AIPrivate-Public Key AuthProgramming LanguagesProject EulerRails credentialsRails Devise IntegrationRails Docker Issues and FixesRails-DockerRails NotesReproducible BuildsSemantic VersioningSoftware EngineeringSuccessChandan's TODOCraftman/EngineerYour first seed