decord/source/126_polyfillObjectProperty.js

30 lines
1,016 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 126
// Function ID: 2112
// Name: polyfillObjectProperty
2026-07-23 10:11:24 +00:00
// Dependencies: [50]
2026-07-20 16:05:17 +00:00
// Module 126 (polyfillObjectProperty)
2026-07-23 10:11:24 +00:00
const global = arg0;
const require = arg1;
const dependencyMap = arg6;
2026-07-20 16:05:17 +00:00
function polyfillObjectProperty(_navigator, product, get) {
const ownPropertyDescriptor = Object.getOwnPropertyDescriptor(_navigator, product);
let obj = ownPropertyDescriptor;
if (!ownPropertyDescriptor) {
obj = {};
}
const configurable = obj.configurable;
if (!ownPropertyDescriptor) {
obj = { get, enumerable: false !== tmp2, writable: false !== tmp3 };
2026-07-23 10:11:24 +00:00
require(50) /* defineLazyObjectProperty */.default(_navigator, product, obj);
const obj2 = require(50) /* defineLazyObjectProperty */;
2026-07-20 16:05:17 +00:00
} else {
const _console = console;
console.error(`Failed to set polyfill. ${product} is not configurable.`);
}
}
arg5.polyfillObjectProperty = polyfillObjectProperty;
arg5.polyfillGlobal = function polyfillGlobal(product, get) {
2026-07-23 10:11:24 +00:00
polyfillObjectProperty(global, product, get);
2026-07-20 16:05:17 +00:00
};