Adding prerender event hook