Skip to content

A small utility to get the prefix vendor function if needed.

License

Notifications You must be signed in to change notification settings

JStiller/praefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Praefix

A small utility to get the prefixed vendor function if needed.

GitHub GitHub issues GitHub pull requests

Sources

If you wan to get more information about vendor prefixes, look up MDN Web Docs.

Install

npm install @jstiller/praefix

Usage

import praefix from "praefix"

const requestAnimationFrameFunction = praefix("requestAnimationFrame", window);

it's equal to the following

const requestAnimationFrameFunction = window.requestAnimationFrame
    || window.mozRequestAnimationFrame
    || window.webkitRequestAnimationFrame
    || window.oRequestAnimationFrame
    || window.msRequestAnimationFrame;

About

A small utility to get the prefix vendor function if needed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published