decord/source/132_HTMLCollection.js

78 lines
2 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 132
// Function ID: 2172
// Name: HTMLCollection
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 99, 100, 131, 129]
2026-07-20 16:05:17 +00:00
// Exports: createHTMLCollection
// Module 132 (HTMLCollection)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
import _classPrivateFieldBase from "_classPrivateFieldBase";
import setPlatformObject from "setPlatformObject";
const require = arg1;
let closure_5 = require("_classPrivateFieldKey")("length");
const tmp2 = (() => {
2026-07-20 16:05:17 +00:00
class HTMLCollection {
constructor(arg0) {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, HTMLCollection);
definePropertyResult = Object.defineProperty(this, outer1_5, { writable: true, value: undefined });
2026-07-20 16:05:17 +00:00
num = 0;
if (0 < arg0.length) {
do {
_Object = Object;
2026-07-23 10:11:24 +00:00
obj = { value: null, enumerable: true, configurable: false, writable: false };
2026-07-20 16:05:17 +00:00
obj.value = arg0[num];
definePropertyResult1 = Object.defineProperty(self, num, obj);
num = num + 1;
length = arg0.length;
} while (num < length);
}
2026-07-23 10:11:24 +00:00
outer1_4(self, outer1_5)[outer1_5] = arg0.length;
2026-07-20 16:05:17 +00:00
return;
}
}
let obj = {
key: "length",
get() {
2026-07-23 10:11:24 +00:00
return outer1_4(this, outer1_5)[outer1_5];
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , ];
obj = {
key: "item",
value: function item(arg0) {
const self = this;
if (arg0 >= 0) {
2026-07-23 10:11:24 +00:00
if (arg0 < outer1_4(self, outer1_5)[outer1_5]) {
2026-07-20 16:05:17 +00:00
return self[arg0];
}
}
return null;
}
};
items[1] = obj;
obj = {
key: "namedItem",
value: function namedItem(arg0) {
return null;
}
};
items[2] = obj;
items[3] = {
key: Symbol.iterator,
value() {
2026-07-23 10:11:24 +00:00
return HTMLCollection(outer1_1[4]).createValueIterator(this);
2026-07-20 16:05:17 +00:00
}
};
return callback(HTMLCollection, items);
2026-07-23 10:11:24 +00:00
})();
let closure_6 = tmp2;
setPlatformObject.setPlatformObject(tmp2);
2026-07-20 16:05:17 +00:00
export default tmp2;
export const createHTMLCollection = function createHTMLCollection(items) {
2026-07-23 10:11:24 +00:00
return new closure_6(items);
2026-07-20 16:05:17 +00:00
};