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

Function makePrefixMap

code/higher-order-components/public/app.js:5957–5967  ·  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

5955 * @returns {object}
5956 */
5957function makePrefixMap(styleProp, eventName) {
5958 var prefixes = {};
5959
5960 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
5961 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
5962 prefixes['Moz' + styleProp] = 'moz' + eventName;
5963 prefixes['ms' + styleProp] = 'MS' + eventName;
5964 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
5965
5966 return prefixes;
5967}
5968
5969/**
5970 * 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