Extend attachPageLoadedHandler with a page type specification