MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / makePrefixMap

Function makePrefixMap

code/communication/public/app.js:5998–6008  ·  view source on GitHub ↗

* Generate a mapping of standard vendor prefixes using the defined style property and event name. * * @param {string} styleProp * @param {string} eventName * @returns {object}

(styleProp, eventName)

Source from the content-addressed store, hash-verified

5996 * @returns {object}
5997 */
5998function makePrefixMap(styleProp, eventName) {
5999 var prefixes = {};
6000
6001 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
6002 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
6003 prefixes['Moz' + styleProp] = 'moz' + eventName;
6004 prefixes['ms' + styleProp] = 'MS' + eventName;
6005 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
6006
6007 return prefixes;
6008}
6009
6010/**
6011 * A list of event names to a configurable list of vendor prefixes.

Callers 1

app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected