Buy Me A Coffee 😇

5 JavaScript Web APIs you may not know

/ Here are 5 JavaScript Web APIs that you may not know. These APIs are going to be useful.

Apr. 15, 2023. 2:57 PM

Clipboard API

allows copying content to and reading content from the device clipboard.

navigator.clipboard.writeText('hellow world')\
    .then(() => { /** success */ })

    .then(text => { /** success */ })

Media Capture

Allows using the device camera and reading the screen content (screen share)

        video: true,
        audio: false
    }).then(stream => {
        /** Use stream of video  */

Animations API

Programmatically create animations in a style that is similar to CSS keyframes.

const keyframes = [
            color: '#000000',
            color: '#431236'

const options = [
    duration: 3000, iterations: Infinity,    

    .animate(keyframes, options);

Share API

Triggers the OS share widget to share content through other applications.

    title: 'My Blog',
    text: 'Check out my cool blog',
    url: ''

Vibration API

Makes the device vibrate on a given pattern (only if the device supports)

window.navigator.vibrate([200, 50, 200])

If you enjoy this article and would like to show your support, you can easily do so by buying me a coffee. Your contribution is greatly appreciated!

Jenuel Ganawed Buy me Coffee