I like this approach but please add a new method like this in order to share this implementation

```js
function dispatchGridPageEvents(prevPage, newPage, duration) {
  var data = {
    detail: {
      duration: duration
    }
  };
  prevPage.container.dispatchEvent(new CustomEvent('gridpagehidestart', data));
  newPage.container.dispatchEvent(new CustomEvent('gridpageshowstart', data));
}
```