Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: static/js/vendor/classList.min.js

Issue 29485575: Issue 5385 - Create Site Header Component for Help Center (Closed)
Left Patch Set: Fix alignment of search form, reformat JS Created Aug. 22, 2017, 12:14 p.m.
Right Patch Set: Include site variables before website-defaults Created Sept. 1, 2017, 12:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « static/js/main.js ('k') | static/scss/base/_font.scss » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
2 "document"in self&&("classList"in document.createElement("_")&&(!document.create ElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg"," g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype ",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+ |\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)i f(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.cod e=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a(" INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e )},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/ ):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.s etAttribute("class",""+this)}},u=l[n]=[],h=function(){return new l(this)};if(a[n ]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){retur n t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;d o t=e[n]+"",-1===c(this,t)&&(this.push(t),s=!0);while(++n<i);s&&this._updateClas sName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do for(t=n[ i]+"",e=c(this,t);-1!==e;)this.splice(e,1),r=!0,e=c(this,t);while(++i<s);r&&this ._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!= =!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},u.toString =function(){return this.join(" ")},s.defineProperty){var f={get:h,enumerable:!0, configurable:!0};try{s.defineProperty(i,e,f)}catch(g){(void 0===g.number||-21468 23252===g.number)&&(f.enumerable=!1,s.defineProperty(i,e,f))}}else s[n].__define Getter__&&i.__defineGetter__(e,h)}}(self),function(){"use strict";var t=document .createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){v ar e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=funct ion(t){var n,i=arguments.length;for(n=0;i>n;n++)t=arguments[n],e.call(this,t)}}; e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){ var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){ return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld