A convenient object that provides various permutations of browser prefix
xtag.prefix[js | css | dom | lowercase]
xtag.prefix[js | css | dom | lowercase]
Permutation | Value |
---|---|
xtag.prefix.js | The version of the current browser's prefix used in common JavaScript code interactions |
xtag.prefix.css | A version of the current browser's prefix in the native CSS format |
xtag.prefix.dom | The version of the current browser's prefix for global DOM APIs |
xtag.prefix.lowercase | A simple, lowercase version of the current browser's prefix |
myElement.style[xtag.prefix.js + 'Transform'] = 'scale(2)';
styleElement.textContent = '#foo {' +
xtag.prefix.css + 'transform: scale(2);' +
'}';
var pointerEventObject = window[xtag.prefix.dom + 'PointerEvent'];
if (xtag.prefix.lowercase == 'webkit') {
// Conditional logic based on feature detection
}