Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and refactor client parser (#2) - Use template element as the default parser - For HTML that doesn't have high-level tags (no <html>, <head>, or <body>) - Fastest parser out of the three - Doesn't load external resources like images when parsing - Use `DOMImplementation` as fallback - For HTML with tags like <head> or <body> (but no <html>) - Second fastest parser out of the three - Use `DOMParser` as final fallback or for parsing high-level tags - For HTML with directive and/or <html> (can handle all cases) - Slowest parser out of the three - Make sure to remove extraneous elements (e.g., <head> or <body>) if they're not in the HTML - Improve regex matching, create constants, and cache values that can optimize the parser
- Loading branch information