Issue #438 (monitorEvents(), Text Editors, JS Utils, Uncats)
If you're working on an app with a bunch of different events taking place on various elements (e.g. click, mouseover, etc.), you might need to log certain events in your browser's console as part of your debugging process.
This can get tedious as you add specific logs for certain cases. A useful feature in Chromium-based browsers is the monitorEvents() method of the Console Utilities API.
To log events on a targeted element, the syntax looks like this:
You would enter this line directly inside your browser's console. It takes two arguments: The object on which you want to monitor events and the event you want to monitor (in quotes as a string).
In the above example I would be logging all click events that take place anywhere on the document object. With that in place, any clicks would produce something like the following in the browser's console:
Notice each of the click events logged is able to be expanded (notice the triangles), which then allows you to fully inspect the event as needed.
This process will continue indefinitely until you reload the page or until you use the unmonitorEvents() method, passing in the same object:
You can use this feature in the DevTools on any web page, you just have to know which object you want to target and what event. I've set up a small demo page with some basic instructions for a few examples you can try, shown here:
As this demonstrates, you can monitor mouse events, window resize, context menu (i.e. when the user right-clicks), etc.
This won't work in Firefox, only in Chrome, Edge, Brave, and similar – basically any Chromium browsers. There are a few solutions for Firefox discussed in this Stack Overflow thread, but nothing built-in that I know of.
For more info on monitorEvents(), here are a few links:
Now on to this week's tools
VS Code Tools, Code Playgrounds, etc.
Retool is the Fast Way to Build Internal Tools
Git Tree Compare
Visually design apps that interface with any database or API. Switch to code to customize how your app looks and works. The result? You can ship the business critical tools you need in days, not months. sponsored
ICYMI, this is a lightweight version of VS Code running fully in the browser. Open a folder on your local machine and start coding, no install required.
VS Code extension that lets you create bookmarks to navigate through your codebase using marked positions.
VS Code extension to automate your commit messages with smart auto-prefill and use shortcuts to add, commit, and push.
VS Code extension that helps you compare your working Git tree against a branch, tag, or commit in a natural folder tree structure or a flat list.
Go Playground WASM
A version of play.golang.org (the Go language playground) that runs completely in the browser.
A Vim plugin for GitHub Copilot, the recently released AI pair programming tool. Requires Neovim 0.6 or higher.
Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere.
VS Code extension that integrates with Jira, GitHub, BitBucket, Slack, and more, so you can manage technical debt and prioritize refactoring work.
Find That Pod
Finding podcasts is hard. Let me help. Subscribe to Find that Pod, a FREE weekly newsletter bringing you 5 awesome, hand-picked podcasts you'll love. sponsored
International Telephone Input
Popup Cookie Creator
Online tool to build and customize a cookie consent popup for your website. The resulting code is hosted with the creator, but I suppose you could self host it if you copy the JS/CSS after you build it.
Tiny UI Toggle
A small library to create various types of elements that can be toggled: Accordion, tabs, dropdown, modal, dialog, etc.
A simple to use, blazing fast, and thoroughly tested WebSocket library for Node.js.
A memoization library that only remembers the latest invocation.
A minimalist component for displaying an interactive file browser in a blog post, documentation, tutorial, etc.
A collection of utility modules to make dealing with async iterators easier.
Node utility to kill the process running on any given port. Exports a single function that takes a port number as the argument and returns a promise.
A cookie serializer and deserializer library for Next.js.
Discover Amazing Podcasts
Need something new to listen to while you're working on your latest web project? Check out Find That Pod, a weekly newsletter with 5 hand-picked podcasts for your listening pleasure. sponsored
A CLI tool to prevent Kubernetes misconfigurations from reaching production by ensuring manifests and Helm charts follow best practices and your own policies.
An open source language, with a rich set of APIs and tooling, for defining, generating, and validating all kinds of data: configuration, APIs, database schemas, code, etc.
A platform to try out and select Code-CAD packages, for those working with CAD technology.
A modern backup program that can back up your files from Linux, BSD, Mac, and Windows to different storage types, including self-hosted and online services.
A screenshot utility for Mac that can create full-browser screenshots, pixelate private info, add annotations, and lots more.
An API with access to over 50,000 categorized jokes and over 100,000 memes.
Online app for authoring slide decks that look hand-drawn, based on Excalidraw, the popular whiteboard tool for hand-drawn diagrams.
A directory of categorized frameworks and libraries to help you choose what technology to use for a specific type of app.
A private search engine that summarizes the web for you, with extensible apps, privacy choices, actionable results, and personalization through preferred sources.
A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
Open source infrastructure-wide continuous profiling that helps you save money, improve performance, and understand incidents better.
On the Release Radar:
Commercial Apps and Classifieds
These are commercial (non-free) tools, paid classifieds, and affiliate links. You can submit a link for consideration or you can buy a classified link (will be marked "ad").
- JetBrains code quality platform for your favourite CI.
- A daily newsletter to keep you informed & entertained. ad
- Actionable SEO data tools, rank checking, etc.
- Get the best lifetime deals on software.
- World’s largest alternative investment community. ad
- Web platform to build REST APIs fast without writing code.
- Build beautiful PDF reports using a simple declarative API.
A Tweet for Thought
I appreciate Camila Lenis taking the time to summarize my life.
Send Me Your Tools!
Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
Before I Go...
If you're knowledgeable on different geographic areas around the world, you'll enjoy Click that 'hood!, an interactive game that tests your expertise on different boroughs and neighbourhoods of cities around the world. I'm terrible at this, because I've only lived in one city in my life and even that city was pretty hard for me. The cool thing is, the names are revealed on hover, so you eventually get them all, they're just difficult if you're not familiar with the area.
Thanks to all for subscribing and reading!