When I send in the options through the trigger event for the 'change' event on the file input selector, buildFileEvent gets called and the function does not include the options with the event object returned.
function buildFileEvent(type, element, files = []) {
let event = buildBasicEvent(type);
if (files.length > 0) {
Object.defineProperty(files, 'item', {
value(index) {
return typeof index === 'number' ? this[index] : null;
}
});
Object.defineProperty(element, 'files', {
value: files
});
}
Object.defineProperty(event, 'target', {
value: element
});
return event;
}