prerender and postrender hooks in x_element