Google has updated its JavaScript SEO help document to add a section on how to properly inject canonical link tags using JavaScript. The document says Google does not recommend using JavaScript for this, however “it is possible to inject a rel=canonical link tag with JavaScript.”