Google added a section on canonicalization best practices for JavaScript to the JavaScript SEO best practices document.
In Chrome, go to chrome://extensions/, enable Developer mode using the toggle in the top-right, then click the “Load unpacked ...