Add node modules and compiled JavaScript from main
This commit is contained in:
parent
8bccaeaf7c
commit
4181bfdf50
7465 changed files with 1775003 additions and 2 deletions
38
node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js
generated
vendored
Normal file
38
node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
|
||||
const idlUtils = require("../generated/utils.js");
|
||||
|
||||
exports.implementation = class StyleSheetList {
|
||||
constructor() {
|
||||
this._list = [];
|
||||
}
|
||||
|
||||
get length() {
|
||||
return this._list.length;
|
||||
}
|
||||
|
||||
item(index) {
|
||||
const result = this._list[index];
|
||||
return result !== undefined ? result : null;
|
||||
}
|
||||
|
||||
get [idlUtils.supportedPropertyIndices]() {
|
||||
return this._list.keys();
|
||||
}
|
||||
|
||||
_add(sheet) {
|
||||
const { _list } = this;
|
||||
if (!_list.includes(sheet)) {
|
||||
_list.push(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
_remove(sheet) {
|
||||
const { _list } = this;
|
||||
|
||||
const index = _list.indexOf(sheet);
|
||||
if (index >= 0) {
|
||||
_list.splice(index, 1);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue