To my knowledge you do something like this to run user scripts.
Which results in the loop member of the users module getting run.
It is then not too much of a stretch to think that you could maybe return more values than just a function.
To be fair there is little to no use for that as there is nothing checking for that value on the backend.
But what if there was.
Something that could display custom values on screen.
Now, there's roomvisuals and the memorywatcher for that which are well and plenty.
But why restrict ourselves to simple values when the most powerfull tool for converting strings to visuals is already in use, Internet browsers. All the tools are already in place we just need to use them.
what i'm suggesting is, what if there was some way to send html from the module object to the webclient?
And have it be inserted into the clients wepage.
(at this point it might be worth it to point out that i only really have a clue as to how webpages work and that everything is just pseudocode)
Now there's a quite blaring issue with this (i'm sure there's plenty actually), what happens if you write something invalid, or a big black box you can't click through, make the page redirect somewhere etc etc, you get the point. Someting so bad it can't be recovered from using normal means.
To that i say, make it a per session opt in. if you fuck up so bad you can't recover reload the page/restart the client change/remove your html value and re-opt-in
With just the ability to do this you could do some pretty amazing things, but what i'll think it'll be used for most is custom, usermade interfaces.
Something like this would open up a wealth of possibilities for players for a relatively small amount of backend work.
As an addendum, since any code written this way is run clientside and only parsed on command (where as normal scripts are parsed and run once a tick) there will likely only be a negligable strain on the servers