vendor/assets/javascripts/webshims/shims/combos/30.js in webshims-rails-1.14.5 vs vendor/assets/javascripts/webshims/shims/combos/30.js in webshims-rails-1.14.6

- old
+ new

@@ -58,11 +58,10 @@ })(window.webshims.$); //DOM-Extension helper webshims.register('dom-extend', function($, webshims, window, document, undefined){ "use strict"; var supportHrefNormalized = !('hrefNormalized' in $.support) || $.support.hrefNormalized; - var supportGetSetAttribute = !('getSetAttribute' in $.support) || $.support.getSetAttribute; var has = Object.prototype.hasOwnProperty; webshims.assumeARIA = true; if($('<input type="email" />').attr('type') == 'text' || $('<form />').attr('novalidate') === "" || ('required' in $('<input />')[0].attributes)){ webshims.error("IE browser modes are busted in IE10+. Please test your HTML/CSS/JS with a real IE version or at least IETester or similiar tools"); @@ -89,11 +88,10 @@ webshims.ready('WINDOWLOAD', switch$); } //shortcus - var modules = webshims.modules; var listReg = /\s*,\s*/; //proxying attribute var olds = {}; var havePolyfill = {}; @@ -474,12 +472,11 @@ } if($.isDOMReady){ (tempCache || $( document.getElementsByTagName(nodeName) )).each(fn); } }; - - var elementExtends = {}; + return { createTmpCache: function(nodeName){ if($.isDOMReady){ tempCache = tempCache || $( document.getElementsByTagName(nodeName) ); } @@ -527,10 +524,11 @@ descs.attr = {}; } }; $.extend(webshims, { + xProps: havePolyfill, getID: (function(){ var ID = new Date().getTime(); return function(elem){ elem = $(elem); var id = elem.prop('id'); @@ -540,9 +538,29 @@ elem.eq(0).prop('id', id); } return id; }; })(), + domPrefixes: ["ws", "webkit", "moz", "ms", "o"], + + prefixed: function (prop, obj){ + var i, testProp; + var ret = false; + if(obj[prop]){ + ret = prop; + } + if(!ret){ + prop = prop.charAt(0).toUpperCase() + prop.slice(1); + for(i = 0; i < webshims.domPrefixes.length; i++){ + testProp = webshims.domPrefixes[i]+prop; + if(testProp in obj){ + ret = testProp; + break; + } + } + } + return ret; + }, shadowClass: 'wsshadow-'+(Date.now()), implement: function(elem, type){ var data = elementData(elem, 'implemented') || elementData(elem, 'implemented', {}); if(data[type]){ webshims.warn(type +' already implemented for element #'+elem.id);