Since T297725: <inputbox> extension should not be allowed to touch .js sub-pages MediaWiki core's preload feature can not be used on non-wikitext pages any more. This was intentionally done with a minimal allow-list in mind, for security reasons. Other content types can be added when the need arises.
Comments suggest that doing anything malicious in the Lua/Module namespace is not possible. While rare, useful applications exist. Therefor the two prove-of-concept patches https://gerrit.wikimedia.org/r/752625 and https://gerrit.wikimedia.org/r/752626 suggest to re-enable the feature for pages with the JSON as well as Lua/Module content model.
Possible questions to discuss:
- Do we have reasons to not allow preloading Lua code?
- The patches suggest an addition to the ContentHandler interface, which is already quite convoluted. Can we come up with something better?
- …