vendor/assets/javascripts/webshims/shims/dom-extend.js in webshims-rails-1.12.0 vs vendor/assets/javascripts/webshims/shims/dom-extend.js in webshims-rails-1.12.2
- old
+ new
@@ -607,11 +607,11 @@
requestAnimationFrame(trigger);
} else {
setTimeout(trigger, 0);
}
- }, (e.type == 'resize' && !window.requestAnimationFrame) ? 50 : 0);
+ }, (e.type == 'resize' && !window.requestAnimationFrame) ? 50 : 9);
};
})(),
_create: function(){
$.each({ Height: "getHeight", Width: "getWidth" }, function(name, type){
var body = document.body;
@@ -632,11 +632,11 @@
this.height = docObserve.getHeight();
this.width = docObserve.getWidth();
setInterval(this.test, 600);
$(this.test);
webshims.ready('WINDOWLOAD', this.test);
- $(document).on('updatelayout pageinit collapsibleexpand shown.bs.modal shown.bs.collapse slid.bs.carousel', this.handler);
+ $(document).on('updatelayout.webshim pageinit popupafteropen panelbeforeopen tabsactivate collapsibleexpand shown.bs.modal shown.bs.collapse slid.bs.carousel', this.handler);
$(window).on('resize', this.handler);
(function(){
var oldAnimate = $.fn.animate;
var animationTimer;
@@ -1079,14 +1079,14 @@
return retDesc;
};
});
webshims.isReady('webshimLocalization', true);
-});
-//html5a11y
-(function($, document){
- if(!$.webshims.assumeARIA || ('content' in document.createElement('template'))){return;}
+
+//html5a11y + hidden attribute
+(function(){
+ if(('content' in document.createElement('template'))){return;}
$(function(){
var main = $('main').attr({role: 'main'});
if(main.length > 1){
webshims.error('only one main element allowed in document');
@@ -1097,10 +1097,12 @@
if(('hidden' in document.createElement('a'))){
return;
}
+ webshims.defineNodeNamesBooleanProperty(['*'], 'hidden');
+
var elemMappings = {
article: "article",
aside: "complementary",
section: "region",
nav: "navigation",
@@ -1137,6 +1139,7 @@
addRole(footer, 'contentinfo');
}
}
});
-})(webshims.$, document);
\ No newline at end of file
+})();
+});