Working message passing between a page and the extension