2024-01-29
1820
#html
Mark Conroy
185698
Jan 29, 2024 ⋅ 6 min read

Build an off-canvas menu with <dialog> and web components

Mark Conroy As a frontend architect, I am interested in reducing the barriers when working on frontend systems, by using HTML, CSS, and JavaScript without the fuss of frameworks, unless necessary. My current major interests are design systems, web components, and Drupal.

Recent posts:

Master JavaScript Date And Time: From Moment.js To Temporal

Master JavaScript date and time: From Moment.js to Temporal

JavaScript’s Date API has many limitations. Explore alternative libraries like Moment.js, date-fns, and the new Temporal API.

Yan Sun
Dec 4, 2024 ⋅ 9 min read
Npm Vs. Npx: What’s The Difference?

npm vs. npx: What’s the difference?

Explore use cases for using npm vs. npx such as long-term dependency management or temporary tasks and running packages on the fly.

Fimber Elemuwa
Dec 3, 2024 ⋅ 5 min read
How To Audit And Validate AI-Generated Code Output

How to audit and validate AI-generated code output

Validating and auditing AI-generated code reduces code errors and ensures that code is compliant.

Boemo Mmopelwa
Dec 2, 2024 ⋅ 5 min read
Building A Background Remover With Vue And Transformers.js

Building a background remover with Vue and Transformers.js

Build a real-time image background remover in Vue using Transformers.js and WebGPU for client-side processing with privacy and efficiency.

Emmanuel John
Nov 29, 2024 ⋅ 9 min read
View all posts

One Reply to "Build an off-canvas menu with <dialog> and web components"

  1. Because this method of animating the dialog’s closing process relies on clicking a specific button, it doesn’t work when the dialog is closed by other means, such as pressing the Esc key.

    Unfortunately, there doesn’t seem to be a `beforeclose` event for dialogs, only `close`, which seems to trigger AFTER the dialog has closed.

Leave a Reply