mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-08-25 21:07:39 +00:00
5 lines
778 B
JavaScript
5 lines
778 B
JavaScript
|
/*
|
||
|
Copyright 2012 Mozilla Foundation * Apachine License Version 2.0 */
|
||
|
(function(){function b(a,b,e,f){var c=(a.className||"").split(/\s+/g);""===c[0]&&c.shift();var d=c.indexOf(b);0>d&&e&&c.push(b);0<=d&&f&&c.splice(d,1);a.className=c.join(" ");return 0<=d}if(!("classList"in document.createElement("div"))){var e={add:function(a){b(this.element,a,!0,!1)},contains:function(a){return b(this.element,a,!1,!1)},remove:function(a){b(this.element,a,!1,!0)},toggle:function(a){b(this.element,a,!0,!0)}};Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){if(this.a)return this.a;
|
||
|
var a=Object.create(e,{element:{value:this,writable:!1,enumerable:!0}});Object.defineProperty(this,"_classList",{value:a,writable:!1,enumerable:!1});return a},enumerable:!0})}})();
|