Google noted that if the HTTP status code is non-200 (for example, on error pages with 404 status code), rendering might be ...
Google added a section on canonicalization best practices for JavaScript to the JavaScript SEO best practices document.