mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Enable ESLint rules that no longer need to be disabled on a directory/file-basis
Given that browsers/environments without native support for both arrow functions and object shorthand properties are no longer supported in PDF.js, please refer to the compatibility information below, we can now enable a fair number of ESLint rules and also simplify/remove some `.eslintrc` files. With the exception of the `no-alert` cases, all code changes were made automatically by using `gulp lint --fix`. - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#browser_compatibility - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#browser_compatibility
This commit is contained in:
parent
2cba290361
commit
4db7330677
25 changed files with 76 additions and 110 deletions
|
@ -58,7 +58,7 @@ function DOMElement(name) {
|
|||
if (name === "style") {
|
||||
this.sheet = {
|
||||
cssRules: [],
|
||||
insertRule: function (rule) {
|
||||
insertRule(rule) {
|
||||
this.cssRules.push(rule);
|
||||
},
|
||||
};
|
||||
|
@ -226,16 +226,16 @@ const document = {
|
|||
return this;
|
||||
},
|
||||
|
||||
createElementNS: function (NS, element) {
|
||||
createElementNS(NS, element) {
|
||||
var elObject = new DOMElement(element);
|
||||
return elObject;
|
||||
},
|
||||
|
||||
createElement: function (element) {
|
||||
createElement(element) {
|
||||
return this.createElementNS("", element);
|
||||
},
|
||||
|
||||
getElementsByTagName: function (element) {
|
||||
getElementsByTagName(element) {
|
||||
if (element === "head") {
|
||||
return [this.head || (this.head = new DOMElement("head"))];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue