I have a complex page where I render large component groups conditionally. The components should be rendered because of side effects of their rendering process but the output is not written to the client. It is achieved using NullWriter if certain conditions met. It would work but the scripts generated by these components are rendered as normal while they should be ignored.
Now I solve it by subclassing Body and doing the checks in the addXScript methods. A better word is copypasting, because Body stores the pagesupportimpl as a private member so subclassing is not really supported.
It is not an important feature (as you see I can solve it using a custom component) but maybe someone else may have such comlex scenario and extensibility is always good in case of framework components I think...
Maybe it was a bad idea to make it a parameter, it would be better as a protected method.