Skip to content
jshacks.dev

Tag

apis

5 posts

Flat illustration of a browser and a server trading a request and a response, with the JavaScript, Google Chrome, Postman and NGINX logos.
Browser

How to Access the Webcam in JavaScript

Access the webcam in JavaScript with getUserMedia: show a live video, choose a camera, capture a photo to canvas, handle permission errors and stop the stream.

7 min read
Flat illustration of a browser and a server trading a request and a response, with the Google Chrome, GraphQL, NGINX and Swagger logos.
Browser

The EyeDropper and Other Small Web APIs

A tour of small web APIs worth knowing: EyeDropper, Web Share, Screen Wake Lock, Vibration, Clipboard and Badging, with feature detection and support notes.

8 min read
Flat illustration of a browser and a server trading a request and a response, with the Google Chrome, Swagger and Postman logos.
Browser

How to Register a Service Worker

Register a service worker with navigator.serviceWorker.register: scope, secure context, lifecycle, install and activate, updates, skipWaiting and debugging.

8 min read