mirror of https://github.com/twbs/ratchet.git
Build mobile apps with simple HTML, CSS, and JS components.
http://goratchet.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
/* ======================================================================== |
|
* Ratchet: common.js v2.0.2 |
|
* http://goratchet.com/ |
|
* ======================================================================== |
|
* Copyright 2015 Connor Sears |
|
* Licensed under MIT (https://github.com/twbs/ratchet/blob/master/LICENSE) |
|
* ======================================================================== */ |
|
|
|
!(function () { |
|
'use strict'; |
|
|
|
// Compatible With CustomEvent |
|
if (!window.CustomEvent) { |
|
window.CustomEvent = function (type, config) { |
|
var e = document.createEvent('CustomEvent'); |
|
e.initCustomEvent(type, config.bubbles, config.cancelable, config.detail); |
|
return e; |
|
}; |
|
} |
|
|
|
// Create Ratchet namespace |
|
if (typeof window.RATCHET === 'undefined') { |
|
window.RATCHET = {}; |
|
} |
|
|
|
// Original script from http://davidwalsh.name/vendor-prefix |
|
window.RATCHET.getBrowserCapabilities = (function () { |
|
var styles = window.getComputedStyle(document.documentElement, ''); |
|
var pre = (Array.prototype.slice |
|
.call(styles) |
|
.join('') |
|
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']) |
|
)[1]; |
|
return { |
|
prefix: '-' + pre + '-', |
|
transform: pre[0].toUpperCase() + pre.substr(1) + 'Transform' |
|
}; |
|
})(); |
|
}());
|
|
|