A simple JavaScript stopwatch
User this JavaScript object to help instrument and diagnose your APIs
Draft
2017-11-19 by rp
It's a good idea to have some metrics baked into APIs and other parts of your code. This little JavaScript object lets you easily capture the elapsed time in milliseconds.
Don't let users lose a page full of data
Protect your users from losing valuable work with a clumsy mouse click
Draft
2018-01-09 by rp
Protect your users from losing valuable work with a clumsy mouse click
Calling a class method from an event handler
Draft
2019-01-03 by rp
This article shows how to exploit the this
-less power of ES6's arrow functions to reference a client-side JavaScript class (or an object) instance method from an event handler assigned in that class.
Declarative DOM element event handlers
A quick way to bind DOM event handlers with JavaScript
2019-07-20 by rp
This article provides a simple, declarative way to assign multiple DOM element event handlers using custom HTML attributes.
Creating a new look for rogerpence.com
Put a new face on my old workhorse
Draft
2019-07-20 by rp
There are tons of articles and videos on how to write CSS and JavaScript for new projects. In this project, I'm going to document refreshing a brown-field project with new CSS and other goodies.