I've entered into a situation where it would be convenient for me to have access to all text after it is generated but before it is streamed to the client.
I'm curious if we could have access to some kind of client functions that allow us this luxury -- right now, there is no way of trapping output to the client, which means that people designing projects need to surround text that they wish to modify with various procs, forcing a lot of work onto them.
So, I propose the following command:
The client.Output proc receives any text that is being sent to that client, and, by default, simply returns that same string, which is then sent on its way. (By default, the client.Output() process would be skipped to save CPU time/etc. if the designer didn't define it.) However, as desired by the designer, the string can be modified before it is actually transmitted to the client. This would be a very convenient place to stick hooks for language filters, etc.
(Eventually, I'd also love a client-side client.Input() proc, which is processed by the client before it is sent to the server (thereby being a convenient way to prevent DoS attacks), but that isn't possible with the current server-side architecture.)
Feb 25 2003, 3:12 pm