I am using the Canny widget in my website, and it tends to modify my URL. I am trying to detect these URL changes, but my code does not alert me to these changes (for instance, it fails to fire when I hit the Browser back button if it takes me from a post within the widget to a board within the widget).
componentWillMount() {
addEventListener('hashchange', function() { console.log('url changed'); });
addEventListener('popstate', function() { console.log('url changed'); });
}
Any ideas for picking up these URL changes the widget is making?
EDIT: Example of how the widget changes the URL:
My URL: mywebsite.com/boards/boardToken
What Canny might change the URL to when selecting a post,
does not fire either event listed above:
mywebsite.com/boards/boardToken/p/selected-post