Simple HTML Tokenizer is a lightweight JavaScript library that can be used to tokenize the kind of HTML normally found in templates. It can be used to preprocess templates to change the behavior of ...
Google added a section on canonicalization best practices for JavaScript to the JavaScript SEO best practices document.