Jan Marek / Webloader and components in body adding javascripts

Notice: This thread is very old.
Member | 487

I have layout like this

{contentType text/html; charset=utf-8}
{capture $_captureHtmlBody}
		{control testControl}

		{control css}
		{control js}

That is bcs any control attached into template could add any css or javascripts it needs, and this scripts we need to be rendered in head by Jan Marek / Webloader.

But if you have ajax request and only some snippets should be rendered, so the nette will check


		if (!headers_sent() && ob_get_level() && ob_get_length()) {
			trigger_error('Possible problem: you are starting session while already having some data in output buffer. This may not work if the outputted data grows. Try starting the session earlier.', E_USER_NOTICE);

and throw error.

Do you have idea what to do with this? How to solve it?