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

Function getVendorPrefixedEventName

code/new-context-api/public/app.js:5384–5400  ·  view source on GitHub ↗

* Attempts to determine the correct vendor prefixed event name. * * @param {string} eventName * @returns {string}

(eventName)

Source from the content-addressed store, hash-verified

5382 * @returns {string}
5383 */
5384function getVendorPrefixedEventName(eventName) {
5385 if (prefixedEventNames[eventName]) {
5386 return prefixedEventNames[eventName];
5387 } else if (!vendorPrefixes[eventName]) {
5388 return eventName;
5389 }
5390
5391 var prefixMap = vendorPrefixes[eventName];
5392
5393 for (var styleProp in prefixMap) {
5394 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
5395 return prefixedEventNames[eventName] = prefixMap[styleProp];
5396 }
5397 }
5398
5399 return eventName;
5400}
5401
5402/**
5403 * Types of raw signals from the browser caught at the top level.

Callers 1

app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected