Add support for page lifecycle listeners