MCPcopy
hub / github.com/rstacruz/jquery.transit / getVendorPropertyName

Function getVendorPropertyName

jquery.transit.js:52–63  ·  view source on GitHub ↗
(prop)

Source from the content-addressed store, hash-verified

50 // Helper function to get the proper vendor property name.
51 // (`transition` => `WebkitTransition`)
52 function getVendorPropertyName(prop) {
53 // Handle unprefixed versions (FF16+, for example)
54 if (prop in div.style) return prop;
55
56 var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
57 var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);
58
59 for (var i=0; i<prefixes.length; ++i) {
60 var vendorProp = prefixes[i] + prop_;
61 if (vendorProp in div.style) { return vendorProp; }
62 }
63 }
64
65 // Helper function to check if transform3D is supported.
66 // Should return true for Webkits and Firefox 10+.

Callers 1

jquery.transit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…