Add node modules and compiled JavaScript from main

This commit is contained in:
Oliver King 2022-11-02 14:26:33 +00:00
parent 8bccaeaf7c
commit 4181bfdf50
7465 changed files with 1775003 additions and 2 deletions

View 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);
}
}
};