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

Function makePrefixMap

code/redux/public/app.js:6214–6224  ·  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

6212 * @returns {object}
6213 */
6214function makePrefixMap(styleProp, eventName) {
6215 var prefixes = {};
6216
6217 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
6218 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
6219 prefixes['Moz' + styleProp] = 'moz' + eventName;
6220 prefixes['ms' + styleProp] = 'MS' + eventName;
6221 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
6222
6223 return prefixes;
6224}
6225
6226/**
6227 * 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