startup/mediawiki.loader.js currently checks if window.Set exists, and if not creates a partial fallback that has support for add() and has(). See code - this was added in T146432, previously we never used window.Set.
based on the browser support at https://www.mediawiki.org/wiki/Compatibility#Browser_support_matrix and caniuse for the Set builtin (https://caniuse.com/mdn-javascript_builtins_set) it appears that all supported browsers already provide the Set class. Can the fallback be removed?