diff --git a/__COMPILE/Element.details.js b/__COMPILE/Element.details.js index be5c60b..1fd725f 100644 --- a/__COMPILE/Element.details.js +++ b/__COMPILE/Element.details.js @@ -1,6 +1,4 @@ -;(function(){"use strict";var d=window; -if(!("open"in document.createElement("details"))){var e,f,g,h;document.head.insertAdjacentHTML("beforeend","
");e={get:function(){return!("nodeName"in this)||"DETAILS"!=this.nodeName.toUpperCase()?void 0:this.hasAttribute("open")},set:function(a){if("nodeName"in -this&&"DETAILS"==this.nodeName.toUpperCase())return g(this),this.classList[a?"add":"remove"]("\u25bc"),this[a?"setAttribute":"removeAttribute"]("open","open"),a}};f=function(a){if(0!==a.detail&&(13===a.keyCode||"click"===a.type))this.parentNode.open=!this.parentNode.open};g=function(a){if(!a.a||!a.a.__isShimmed){a.a||(a.a={});for(var b,c,i=-1;c=a.childNodes[++i];)3===c.nodeType&&/[^\t\n\r ]/.test(c.data)?(a.insertBefore(document.createElement("x-i"),c).innerHTML=c.data,a.removeChild(c)):"SUMMARY"== -c.nodeName.toUpperCase()&&(b=c);b||((b=document.createElement("x-s")).innerHTML="Details",b.className="\u25bc\u25bc");a.insertBefore(b,a.childNodes[0]);b.insertBefore(document.createElement("x-i"),b.childNodes[0]).className="details-marker";b.tabIndex=0;b.addEventListener("click",f,!1);b.addEventListener("keyup",f,!1);a.a.__isShimmed=1}};h=function(){Object.defineProperty(d.Element.prototype,"open",e);for(var a=document.getElementsByTagName("details"),b,c=-1;b=a[++c];)b.open=b.hasAttribute("open")}; -"complete"!=document.readyState?document.addEventListener("DOMContentLoaded",h,!1):h()}; -})(); +(function(h,k){if(!k){var f,e,g,d;document.head.insertAdjacentHTML("beforeend","
");f={get:function(){return"nodeName"in this&&"DETAILS"==this.nodeName.toUpperCase()?this.hasAttribute("open"):void 0},set:function(a){if("nodeName"in this&& +"DETAILS"==this.nodeName.toUpperCase())return g(this),this.classList[a?"add":"remove"]("\u25bc"),this[a?"setAttribute":"removeAttribute"]("open","open"),a}};e=function(a){if(13===a.keyCode||"click"===a.type)this.parentNode.open=!this.parentNode.open};g=function(a){if(!a._||!a._.__isShimmed){a._||(a._={});for(var b,c,d=-1;c=a.childNodes[++d];)3===c.nodeType&&/[^\t\n\r ]/.test(c.data)?(a.insertBefore(document.createElement("x-i"),c).innerHTML=c.data,a.removeChild(c)):"SUMMARY"==c.nodeName.toUpperCase()&& +(b=c);b||((b=document.createElement("x-s")).innerHTML="Details",b.className="\u25bc\u25bc");a.insertBefore(b,a.childNodes[0]);b.insertBefore(document.createElement("x-i"),b.childNodes[0]).className="details-marker";b.tabIndex=0;b.addEventListener("click",e,!1);b.addEventListener("keyup",e,!1);a._.__isShimmed=1}};d=function(){Object.defineProperty(h.Element.prototype,"open",f);for(var a=document.getElementsByTagName("details"),b,c=-1;b=a[++c];)b.open=b.hasAttribute("open")};"complete"!=document.readyState? +document.addEventListener("DOMContentLoaded",d,!1):d()}})(window,"open"in document.createElement("details")); diff --git a/__SRC/Element.details.js b/__SRC/Element.details.js index c80979b..38cf7fa 100644 --- a/__SRC/Element.details.js +++ b/__SRC/Element.details.js @@ -58,8 +58,6 @@ HTMLElement.prototype.insertAdjacentHTML = https://gist.github.com/1276030 //event event_DetailClick = function(e) { - if(e.detail === 0)return;//Opera generate "click" event with `detail` == 0 together with "keyup" event - // 32 - space. Need this ??? // 13 - Enter.